From 0f2315b13ba00bef5384c960d8d8cb55f9b86274 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 13:06:06 +0300 Subject: [PATCH 01/10] Add a Java bindings generator on top of the C bindings Like the Rust generator, it consumes the C bindings description JSON and emits sources that call the C library through the foreign function API of Java 22, so there's no JNI glue. Opaque classes are wrappers with cleaner-based ownership, exposed structs are views over native memory with the C++ layout, enums are newtype classes, and the rest of the mapping follows the Rust one. Overloads keep their C++ names when the Java parameter types differ. Co-Authored-By: Claude Fable 5.1 --- .gitignore | 3 + CMakeLists.txt | 21 +- docs/generating_java.md | 93 ++ src/generators/java/generator.cpp | 2129 +++++++++++++++++++++++++++++ src/generators/java/generator.h | 199 +++ src/generators/java/main.cpp | 144 ++ test/make_java.sh | 47 + test/run_java/Main.java | 94 ++ 8 files changed, 2729 insertions(+), 1 deletion(-) create mode 100644 docs/generating_java.md create mode 100644 src/generators/java/generator.cpp create mode 100644 src/generators/java/generator.h create mode 100644 src/generators/java/main.cpp create mode 100644 test/make_java.sh create mode 100644 test/run_java/Main.java diff --git a/.gitignore b/.gitignore index d88c110b..3067034c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ /test/output_rust*/Cargo.lock /test/run_rust/target/ /test/run_rust/Cargo.lock +/test/output_java*/classes/ +/test/output_java*/sources.txt +/test/run_java/classes/ parallel-hashmap/ /examples/cxx.txt /examples/c/output diff --git a/CMakeLists.txt b/CMakeLists.txt index c359378c..6a07ae86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,8 +149,9 @@ endif() option(MRBIND_BUILD_GENERATOR_C "Build the C binding generator." ON) option(MRBIND_BUILD_GENERATOR_CSHARP "Build the C# binding generator." ON) option(MRBIND_BUILD_GENERATOR_RUST "Build the Rust binding generator." ON) +option(MRBIND_BUILD_GENERATOR_JAVA "Build the Java binding generator." ON) -if(MRBIND_BUILD_GENERATOR_C OR MRBIND_BUILD_GENERATOR_CSHARP OR MRBIND_BUILD_GENERATOR_RUST) +if(MRBIND_BUILD_GENERATOR_C OR MRBIND_BUILD_GENERATOR_CSHARP OR MRBIND_BUILD_GENERATOR_RUST OR MRBIND_BUILD_GENERATOR_JAVA) add_library(mrbind_gen_common STATIC src/generators/common/data_from_json.cpp src/generators/common/load_file.cpp @@ -237,3 +238,21 @@ if(MRBIND_BUILD_GENERATOR_RUST) apply_static_stdlib(mrbind_gen_rust) endif() endif() + +if(MRBIND_BUILD_GENERATOR_JAVA) + add_executable(mrbind_gen_java + src/generators/java/generator.cpp + src/generators/java/main.cpp + ) + target_include_directories(mrbind_gen_java PRIVATE + deps/cppdecl/include + ) + target_link_libraries(mrbind_gen_java PRIVATE + mrbind_common + mrbind_gen_common + mrbind_c_interop + ) + if(MRBIND_STATIC_BUILD) + apply_static_stdlib(mrbind_gen_java) + endif() +endif() diff --git a/docs/generating_java.md b/docs/generating_java.md new file mode 100644 index 00000000..90c806e6 --- /dev/null +++ b/docs/generating_java.md @@ -0,0 +1,93 @@ +# Generating Java bindings + +We generate Java sources that call the C bindings through the foreign function API (`java.lang.foreign`, final since Java 22), so you're required to [generate our C bindings first](/docs/generating_c.md). There's no JNI glue to compile. + +The sources are portable, but they load the C shared library at runtime, so you must compile the C bindings for every platform you want to support. Only 64-bit platforms are supported. + +## Generating the C bindings + +Pass `--output-desc-json c_desc.json` to the C generator to make it dump the C bindings description, which the Java generator consumes. The description includes the C signature of every generated function, so the Java generator never needs to see the C headers. + +You must also pass `--force-emit-common-helpers`, since the generated Java code calls the common helper functions (the exception handler). + +It's recommended to pass [`--copy-inherited-members`](/docs/generating_c.md#inherit-class-members) too, otherwise the derived classes won't have the methods of their bases. + +## Running the Java generator + +The Java bindings are produced by a separate executable, `build/mrbind_gen_java`: +```sh +build/mrbind_gen_java \ + --input-json c_desc.json \ + --output-dir mylib/src \ + --package com.example.mylib \ + --imported-lib-name MyLib \ + --force-namespace MyLib +``` +Where: + +* `c_desc.json` is the file produced by the C generator in response to `--output-desc-json`. + +* `--output-dir mylib/src` is the root of the generated sources, the package directories are created in it. + + The default behavior is to error if this directory is not empty, pass `--clean-output-dir` to delete the contents instead. + +* `--package com.example.mylib` is the base Java package. The runtime support classes go directly into it, so it should be dedicated to the bindings. The C++ namespaces become its subpackages, and the raw downcall handles go to its `ffi` subpackage. + +* `--imported-lib-name MyLib` is the C shared library name that we'll load at runtime with `System.loadLibrary("MyLib")`. It must be produced by compiling the code produced by our C bindings generator. + + Don't add any extensions, and don't add the `lib` prefix. + + If you used `--split-library` in the C generator, pass `--imported-split-lib-name ` for every part, like with the C# generator. + +* `--force-namespace MyLib` is optional, but you'll usually want it. It puts the entities of the global C++ namespace (which includes the `std::` container instantiations) into the package of this namespace (`com.example.mylib.mylib` here, `Foo::Bar` becomes `foo.bar`). Without it they go directly to the base package, next to the runtime classes. + +The generator prints a summary at the end: how many functions got wrappers, how many of those use raw C types, and how many were skipped because their C types can't be spelled in Java (`long double` and such). Pass `--verbose` to list the skipped ones. + +### Compiling and running + +Compile the sources with any JDK 22 or newer. There are usually too many files for the command line, so pass them through a file: +```sh +find mylib/src -name '*.java' > sources.txt +javac --release 22 -d mylib/classes @sources.txt +jar --create --file mylib.jar -C mylib/classes . +``` +The generated code has no dependencies. It compiles with `-Xlint:all -Werror`. + +At runtime the C bindings library must be in `java.library.path` (`-Djava.library.path=/path/to/c/bindings`), or at least loadable by its file name through the system library search path. The foreign function API is a restricted API, so pass `--enable-native-access=ALL-UNNAMED` (or the name of your module) to `java` to avoid a warning on the first call. + +## What the generated code looks like + +A C++ namespace becomes a Java package named after it in lower case (`MR::Foo` → `mr.foo`), nested in the base package. A class in it becomes a Java class of the same name (nested C++ classes are flattened: `A::B` → `A_B`, template instantiations and `std::` types get the names of their C types minus the prefix: `std_vector_int`). The free functions of a namespace are the static methods of its `Functions` class. + +The `ffi` subpackage mirrors the file hierarchy of the C bindings: for every C source `foo/bar.h` there's a `ffi/foo/bar.java` holding the downcall `MethodHandle` of every function of that file (in nested classes of 200 handles each, to keep the static initializers small). You don't normally name those, the wrappers do. + +The runtime support classes live in the base package: `Ffi` (library loading, the struct layout helper, the exception handler), `CppObject`, `CppStruct`, `Native` and `CppException`. + +The wrappers: + +* Classes that need to live on the heap are opaque, their wrappers hold a pointer. A wrapper created by a constructor or returned by value *owns* the C++ object: it's destroyed when the wrapper is garbage-collected (through `java.lang.ref.Cleaner`), or earlier when `close()` is called (the wrappers are `AutoCloseable`, so `try (var mesh = ...)` works). A wrapper returned by reference doesn't own the object, and keeps the wrapper it was obtained from alive, so the reference doesn't dangle. + +* Parameters take wrappers: `const T &`, `T &` and by-value copies all take a `T`. Pointers and parameters with default arguments are nullable, `null` passes a null pointer or asks for the default argument. `std::optional` parameters are nullable too. Passing a non-copyable class by value moves from the wrapper, which can't be used after that (see `CppObject.release()`). + +* `std::string`, `std::string_view` and `std::filesystem::path` parameters take a `String`. Returned strings are `std_string` wrappers, whose `toString()` decodes them as UTF-8. + +* Scalars by const pointer or reference take the Java primitive (boxed when nullable), and are returned as the primitive. Scalars by non-const pointer stay raw, Java can't write through them. + +* Enums are classes with the constants as static fields, and the underlying value in the `value` field, so they can also hold values that aren't named constants. `E.of(value)` finds the constant. + +* The structs exposed with `--expose-as-struct` are views over native memory with the C++ layout: the fields are accessed in place with `x()`/`setX()` (arrays with an index), `copy()` makes an independent copy, `set()` overwrites the contents. Instances created in Java own their memory, those returned by reference point into the memory of their owner. The layout is built at runtime with the C alignment rules, and checked against the sizes the C bindings were generated with when the struct has no platform-sized fields. + +* Functions that the safe layer doesn't understand (callbacks, `std::shared_ptr`, arrays of unknown bound, ...) are still generated, but take and return raw `MemorySegment`s and primitives. The doc comment of each wrapper names the C function it calls, so the C bindings documentation applies. + +Overloaded functions keep their names as long as their Java parameter types differ. Those that would clash get the disambiguated names of their C functions (e.g. `boolean_4_const_MR_Mesh_ref`). Constructors become Java constructors on the same condition, else static factories. Overloaded operators are `opAdd`, `opEqual`, `opNotEqual`, `opAddAssign`, etc. + +C++ exceptions are caught by the C bindings (unless the C generator ran with `--no-handle-exceptions`) and rethrown as `CppException` with the exception message. + +## Known limitations + +This backend is as young as the Rust one, and shares its limitations: + +* Inherited members are only available if the C generator copied them (`--copy-inherited-members`); there are no conversions between a class and its bases. +* `std::function` parameters take raw function pointers. +* Containers only expose the methods that the C bindings have (`size()`, `at()`, ...), there's no `Iterable` or `List` integration yet. +* Output parameters of scalar types (`int &`) are raw. diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp new file mode 100644 index 00000000..4cd31c59 --- /dev/null +++ b/src/generators/java/generator.cpp @@ -0,0 +1,2129 @@ +#include "generators/java/generator.h" + +#include "common/strings.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace mrbind::Java +{ + namespace + { + [[nodiscard]] std::string Indent(std::string_view str, int levels) + { + if (levels <= 0 || str.empty()) + return std::string(str); + std::string pad(std::size_t(levels) * 4, ' '); + std::string ret; + std::size_t pos = 0; + while (pos < str.size()) + { + std::size_t end = str.find('\n', pos); + if (end == std::string_view::npos) + end = str.size(); + if (end > pos) + { + ret += pad; + ret += str.substr(pos, end - pos); + } + ret += '\n'; + pos = end + 1; + } + return ret; + } + + [[nodiscard]] std::string EscapeJavaString(std::string_view str) + { + std::string ret; + for (char ch : str) + { + if (ch == '\\' || ch == '"') + ret += '\\'; + if (ch == '\n') + ret += "\\n"; + else if (ch == '\r') + ret += "\\r"; + else + ret += ch; + } + return ret; + } + + [[nodiscard]] std::string JoinNameParts(const std::vector &parts, std::string_view sep) + { + std::string ret; + for (const auto &part : parts) + { + if (!ret.empty()) + ret += sep; + ret += part; + } + return ret; + } + + [[nodiscard]] std::string PartToString(const cppdecl::UnqualifiedName &part) + { + if (auto str = std::get_if(&part.var)) + return *str; + return cppdecl::ToCode(part, {}); + } + + // Returns true if the type is `const char *`. + [[nodiscard]] bool IsConstCharPtr(const cppdecl::Type &type) + { + return type.modifiers.size() == 1 && type.Is() && type.IsConst(1) && type.simple_type.name.AsSingleWord() == "char" && type.simple_type.flags == cppdecl::SimpleTypeFlags{}; + } + + [[nodiscard]] std::string ToLower(std::string str) + { + for (char &ch : str) + ch = char(std::tolower((unsigned char)ch)); + return str; + } + + // The boxed type of a Java primitive, or the type itself. + [[nodiscard]] std::string Boxed(const std::string &prim) + { + if (prim == "int") return "java.lang.Integer"; + if (prim == "long") return "java.lang.Long"; + if (prim == "short") return "java.lang.Short"; + if (prim == "byte") return "java.lang.Byte"; + if (prim == "float") return "java.lang.Float"; + if (prim == "double") return "java.lang.Double"; + if (prim == "boolean") return "java.lang.Boolean"; + if (prim == "char") return "java.lang.Character"; + return prim; + } + + // Returns the Java identifier of an output file path component: `1` -> `_1`. + [[nodiscard]] std::string PathIdent(std::string_view str) + { + return JavaIdent(std::string(str)); + } + + constexpr std::string_view kMemorySegment = "java.lang.foreign.MemorySegment"; + constexpr std::string_view kArena = "java.lang.foreign.Arena"; + constexpr std::string_view kValueLayout = "java.lang.foreign.ValueLayout"; + constexpr std::string_view kMemoryLayout = "java.lang.foreign.MemoryLayout"; + } + + std::string JavaIdent(std::string str) + { + static const std::set keywords = { + "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "default", "do", "double", + "else", "enum", "extends", "final", "finally", "float", "for", "goto", "if", "implements", "import", "instanceof", "int", "interface", + "long", "native", "new", "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", + "synchronized", "this", "throw", "throws", "transient", "try", "void", "volatile", "while", "true", "false", "null", "_", + "var", "record", "yield", "sealed", "permits", + }; + + for (char &ch : str) + { + bool ok = (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_'; + if (!ok) + ch = '_'; + } + if (str.empty()) + str = "_unnamed"; + if (str.front() >= '0' && str.front() <= '9') + str = '_' + str; + if (keywords.contains(str)) + return str + '_'; + return str; + } + + std::string JavaMethodName(std::string_view str) + { + std::string ret(str); + if (!ret.empty() && ret.front() >= 'A' && ret.front() <= 'Z') + ret.front() = char(ret.front() - 'A' + 'a'); + return JavaIdent(ret); + } + + std::string Capitalize(std::string str) + { + if (!str.empty() && str.front() >= 'a' && str.front() <= 'z') + str.front() = char(str.front() - 'a' + 'A'); + return str; + } + + const cppdecl::Type &Generator::ParseTypeOrThrow(const std::string &str) + { + auto [iter, is_new] = cached_parsed_types.try_emplace(str); + if (!is_new) + return iter->second; + + std::string_view view = str; + auto ret = cppdecl::ParseType(view); + if (auto error = std::get_if(&ret)) + throw std::runtime_error("Unable to parse type `" + str + "`, error at offset " + std::to_string(view.data() - str.data()) + ": " + error->message); + if (!view.empty()) + throw std::runtime_error("Unable to parse type `" + str + "`, junk starting at offset " + std::to_string(view.data() - str.data()) + "."); + iter->second = std::move(std::get(ret)); + return iter->second; + } + + Generator::Module &Generator::GetModuleForNamespace(const std::vector &ns_parts) + { + Module *m = &root; + for (const auto &part : ns_parts) + { + std::string name = JavaIdent(ToLower(part)); + if (name == "ffi") + name += '_'; + auto [iter, is_new] = m->children.try_emplace(name); + if (is_new) + { + iter->second.package = m->package + "." + name; + iter->second.dir = m->dir + "/" + name; + iter->second.used_names.insert("Functions"); // The holder of the free functions. + } + m = &iter->second; + } + return *m; + } + + Generator::FileClass &Generator::GetFileClass(const CInterop::OutputFile &file) + { + auto [iter, is_new] = file_classes.try_emplace(file.relative_name); + FileClass &ret = iter->second; + if (is_new) + { + ret.relative_name = file.relative_name; + ret.group = file.group; + std::string_view str = file.relative_name; + while (!str.empty()) + { + std::size_t sep = str.find('/'); + std::string_view part = str.substr(0, sep); + if (!part.empty()) + ret.idents.push_back(PathIdent(part)); + str = sep == std::string_view::npos ? std::string_view{} : str.substr(sep + 1); + } + if (ret.idents.empty()) + throw std::runtime_error("Bad relative file name in the input JSON: `" + file.relative_name + "`."); + ret.java_path = base_package + ".ffi." + JoinNameParts(ret.idents, "."); + } + else if (ret.group != file.group) + { + throw std::runtime_error("The file `" + file.relative_name + "` is mentioned with two different groups: `" + ret.group + "` and `" + file.group + "`."); + } + return ret; + } + + std::string Generator::HandleHolder(const FileClass &file, std::size_t index) + { + return file.java_path + ".H" + std::to_string(index / handles_per_chunk); + } + + std::string Generator::UniqueName(std::set &used, std::string name) + { + if (used.insert(name).second) + return name; + for (int i = 2;; i++) + { + std::string candidate = name + '_' + std::to_string(i); + if (used.insert(candidate).second) + return candidate; + } + } + + std::string Generator::MakeDocComment(const CInterop::Comment &comment, int indent, const std::string &extra_line) const + { + std::vector lines; + std::string_view str = comment.c_style; + std::size_t pos = 0; + while (pos < str.size()) + { + std::size_t end = str.find('\n', pos); + if (end == std::string_view::npos) + end = str.size(); + std::string_view line = str.substr(pos, end - pos); + pos = end + 1; + + while (!line.empty() && (line.front() == ' ' || line.front() == '\t')) + line.remove_prefix(1); + for (std::string_view prefix : {"///", "//!", "//", "/**", "/*!", "/*", "*/"}) + { + if (line.starts_with(prefix)) + { + line.remove_prefix(prefix.size()); + break; + } + } + if (line.starts_with("*") && !line.starts_with("*/")) + line.remove_prefix(1); + if (line.ends_with("*/")) + line.remove_suffix(2); + while (!line.empty() && (line.back() == ' ' || line.back() == '\t' || line.back() == '\r')) + line.remove_suffix(1); + if (line.starts_with(' ')) + line.remove_prefix(1); + lines.push_back(Strings::Replace(line, "*/", "*/")); + } + if (!extra_line.empty()) + { + if (!lines.empty()) + lines.push_back(""); + lines.push_back(extra_line); + } + if (lines.empty()) + return {}; + + std::string ret = "/**\n"; + for (const auto &line : lines) + { + ret += " *"; + if (!line.empty()) + { + ret += ' '; + ret += line; + } + ret += '\n'; + } + ret += " */\n"; + return Indent(ret, indent); + } + + std::optional Generator::CTypeToJava(const std::string &str) + { + return CTypeToJava(ParseTypeOrThrow(str), 0); + } + + std::optional Generator::CTypeToJava(const cppdecl::Type &type, std::size_t i) + { + auto Prim = [](std::string_view layout, std::string_view java, std::string_view size, bool platform_dependent = false) + { + JavaType ret; + ret.layout = std::string(kValueLayout) + "." + std::string(layout); + ret.java = java; + ret.size_expr = size; + ret.platform_dependent = platform_dependent; + return ret; + }; + + if (i == type.modifiers.size()) + { + std::string_view word = type.simple_type.name.AsSingleWord(); + const bool is_unsigned = bool(type.simple_type.flags & cppdecl::SimpleTypeFlags::unsigned_); + const bool is_signed = bool(type.simple_type.flags & cppdecl::SimpleTypeFlags::explicitly_signed); + + if (!word.empty()) + { + if (word == "void") + { + JavaType ret; + ret.java = "void"; + return ret; + } + if (word == "bool") return Prim("JAVA_BOOLEAN", "boolean", "1"); + if (word == "char") return Prim("JAVA_BYTE", "byte", "1"); + if (word == "short") return Prim("JAVA_SHORT", "short", "2"); + if (word == "int") return Prim("JAVA_INT", "int", "4"); + if (word == "long") + { + JavaType ret; + ret.layout = RuntimeClass("Ffi") + ".C_LONG"; + ret.java = "long"; + ret.size_expr = "8"; + ret.platform_dependent = true; + ret.is_c_long = true; + return ret; + } + if (word == "long long") return Prim("JAVA_LONG", "long", "8"); + if (is_unsigned || is_signed) return {}; + if (word == "float") return Prim("JAVA_FLOAT", "float", "4"); + if (word == "double") return Prim("JAVA_DOUBLE", "double", "8"); + if (word == "size_t" || word == "ptrdiff_t" || word == "intptr_t" || word == "uintptr_t") return Prim("JAVA_LONG", "long", "8", true); + if (word == "int8_t" || word == "uint8_t") return Prim("JAVA_BYTE", "byte", "1"); + if (word == "int16_t" || word == "uint16_t") return Prim("JAVA_SHORT", "short", "2"); + if (word == "int32_t" || word == "uint32_t") return Prim("JAVA_INT", "int", "4"); + if (word == "int64_t" || word == "uint64_t") return Prim("JAVA_LONG", "long", "8"); + if (word == "long double" || word == "wchar_t" || word == "char8_t" || word == "char16_t" || word == "char32_t") return {}; + } + + std::string name = cppdecl::ToCode(type.simple_type.name, {}); + if (name == c_desc.helpers_prefix + "PassBy") + return Prim("JAVA_INT", "int", "4"); + // The fixed-size typedefs of `--canonicalize-to-fixed-size-typedefs`, e.g. `MR_C_int64_t`. Those are always the fixed size, even when spelled via `size_t`. + if (name.starts_with(c_desc.helpers_prefix)) + { + std::string_view rest = std::string_view(name).substr(c_desc.helpers_prefix.size()); + if (rest == "int8_t" || rest == "uint8_t") return Prim("JAVA_BYTE", "byte", "1"); + if (rest == "int16_t" || rest == "uint16_t") return Prim("JAVA_SHORT", "short", "2"); + if (rest == "int32_t" || rest == "uint32_t") return Prim("JAVA_INT", "int", "4"); + if (rest == "int64_t" || rest == "uint64_t") return Prim("JAVA_LONG", "long", "8"); + } + + const TypeInfo *info = nullptr; + if (auto iter = types_by_c_name.find(name); iter != types_by_c_name.end()) + info = iter->second; + else if (auto iter2 = types_by_cpp_name.find(name); iter2 != types_by_cpp_name.end()) + info = &iter2->second; + if (!info) + return {}; + + if (info->IsEnum()) + { + JavaType ret; + ret.layout = info->enum_layout; + ret.java = info->enum_java_type; + ret.size_expr = info->enum_size; + ret.type_info = info; + return ret; + } + if (info->IsExposedStruct()) + { + JavaType ret; + ret.layout = info->java_path + ".LAYOUT"; + ret.java = std::string(kMemorySegment); + ret.size_expr = info->java_path + ".LAYOUT.byteSize()"; + ret.platform_dependent = platform_dependent_structs.contains(info->cpp_name); + ret.type_info = info; + return ret; + } + return {}; // Opaque classes can't be used by value. + } + + if (type.Is(i)) + { + JavaType ret; + ret.layout = std::string(kValueLayout) + ".ADDRESS"; + ret.java = std::string(kMemorySegment); + ret.size_expr = "8"; + ret.is_pointer = true; + ret.platform_dependent = true; + if (type.Is(i + 1)) + return ret; + // The pointee must be something we know, or `void`. + if (type.simple_type.name.AsSingleWord() != "void") + { + std::size_t j = i + 1; + while (j < type.modifiers.size() && (type.Is(j) || type.Is(j))) + j++; + if (j < type.modifiers.size()) + return {}; + auto pointee = CTypeToJava(type, j); + if (!pointee) + { + // Pointers to opaque classes. + std::string name = cppdecl::ToCode(type.simple_type.name, {}); + if (!types_by_c_name.contains(name) && !types_by_cpp_name.contains(name)) + return {}; + } + } + return ret; + } + + if (auto arr = type.As(i)) + { + if (arr->size.tokens.size() != 1) + return {}; + auto lit = std::get_if(&arr->size.tokens.front()); + if (!lit) + return {}; + auto size = lit->ToInteger(); + if (!size) + return {}; + auto inner = CTypeToJava(type, i + 1); + if (!inner || inner->java == "void") + return {}; + JavaType ret; + ret.layout = std::string(kMemoryLayout) + ".sequenceLayout(" + std::to_string(*size) + ", " + inner->layout + ")"; + ret.java = std::string(kMemorySegment); + ret.size_expr = "(" + inner->size_expr + " * " + std::to_string(*size) + ")"; + ret.platform_dependent = inner->platform_dependent; + ret.array_dims = inner->array_dims; + ret.array_dims.insert(ret.array_dims.begin(), *size); + ret.array_elem = inner->array_dims.empty() ? std::make_shared(*inner) : inner->array_elem; + return ret; + } + + return {}; + } + + void Generator::CollectTypes() + { + root.package = base_package; + std::string base_dir = base_package; + std::replace(base_dir.begin(), base_dir.end(), '.', '/'); + root.dir = base_dir; + root.used_names.insert("Functions"); + for (std::string_view name : {"Ffi", "Native", "CppObject", "CppStruct", "CppException"}) + root.used_names.insert(std::string(name)); + + // First pass: register all names, so that nested classes can find their enclosing classes. + for (const auto &cpp_name : c_desc.cpp_types.Vec()) + { + const CInterop::TypeDesc &desc = c_desc.cpp_types.Map().at(cpp_name); + TypeInfo info; + info.cpp_name = cpp_name; + if (auto class_desc = std::get_if(&desc.var)) + { + info.class_desc = class_desc; + info.c_name = class_desc->c_name; + } + else if (auto enum_desc = std::get_if(&desc.var)) + { + info.enum_desc = enum_desc; + info.c_name = enum_desc->c_name; + } + else + { + continue; + } + info.traits = desc.traits ? &*desc.traits : nullptr; + info.has_destroy = info.class_desc && info.class_desc->kind != CInterop::ClassKind::exposed_struct && info.class_desc->kind != CInterop::ClassKind::ref_only + && info.traits && info.traits->destructible != CInterop::SpecialMemberKind::disabled; + info.copyable = info.class_desc && info.traits && info.traits->copy_constructible != CInterop::SpecialMemberKind::disabled; + types_by_cpp_name.try_emplace(cpp_name, std::move(info)); + } + + for (auto &[cpp_name, info] : types_by_cpp_name) + { + types_by_c_name[info.c_name] = &info; + + const cppdecl::Type &type = ParseTypeOrThrow(cpp_name); + const auto &parts = type.simple_type.name.parts; + + bool use_c_name = !type.IsOnlyQualifiedName() || parts.empty(); + for (const auto &part : parts) + { + if (part.template_args || !std::holds_alternative(part.var)) + use_c_name = true; + } + if (!use_c_name && (PartToString(parts.front()) == "std" || PartToString(parts.front()) == "tl")) + use_c_name = true; + + if (use_c_name) + { + // Template instantiations of parsed classes go to the package of their namespace, named after the C name minus the namespace. + // Everything else (`std::...` and such) goes to the base package, named after the C name minus the helpers prefix. + std::vector ns_parts; + if (type.IsOnlyQualifiedName() && !parts.empty() && std::holds_alternative(parts.front().var) && PartToString(parts.front()) != "std" && PartToString(parts.front()) != "tl") + { + for (std::size_t i = 0; i + 1 < parts.size() && !parts[i].template_args && std::holds_alternative(parts[i].var); i++) + { + std::string prefix = JoinNameParts(ns_parts, "::") + (ns_parts.empty() ? "" : "::") + PartToString(parts[i]); + if (types_by_cpp_name.contains(prefix)) + break; + ns_parts.push_back(PartToString(parts[i])); + } + } + + std::string ident = info.c_name; + std::string ns_prefix = JoinNameParts(ns_parts, "_") + "_"; + if (!ns_parts.empty() && ident.starts_with(ns_prefix)) + ident.erase(0, ns_prefix.size()); + else if (ident.starts_with(c_desc.helpers_prefix)) + ident.erase(0, c_desc.helpers_prefix.size()); + else + ns_parts.clear(); + if (ns_parts.empty()) + ns_parts = forced_namespace; + info.module = &GetModuleForNamespace(ns_parts); + info.java_unqual = UniqueName(info.module->used_names, JavaIdent(ident)); + } + else + { + std::vector ns_parts; + std::string unqual; + std::string prefix; + for (std::size_t i = 0; i + 1 < parts.size(); i++) + { + if (!prefix.empty()) + prefix += "::"; + prefix += PartToString(parts[i]); + if (types_by_cpp_name.contains(prefix)) + { + // Nested in a class. Merge the remaining parts. + std::vector rest; + for (std::size_t j = i; j < parts.size(); j++) + rest.push_back(PartToString(parts[j])); + unqual = JoinNameParts(rest, "_"); + break; + } + ns_parts.push_back(PartToString(parts[i])); + } + if (unqual.empty()) + unqual = PartToString(parts.back()); + if (ns_parts.empty()) + ns_parts = forced_namespace; + info.module = &GetModuleForNamespace(ns_parts); + info.java_unqual = UniqueName(info.module->used_names, JavaIdent(unqual)); + } + info.java_path = info.module->package + "." + info.java_unqual; + info.file = &GetFileClass(info.class_desc ? info.class_desc->output_file : info.enum_desc->output_file); + + if (info.IsEnum()) + { + auto underlying = CTypeToJava(info.enum_desc->underlying_type); + if (!underlying || underlying->java == "void" || underlying->is_pointer) + throw std::runtime_error("Unknown underlying type `" + info.enum_desc->underlying_type + "` of enum `" + cpp_name + "`."); + info.enum_layout = underlying->layout; + info.enum_java_type = underlying->java; + info.enum_size = underlying->size_expr; + info.enum_is_c_long = underlying->is_c_long; + } + } + + // Exposed structs whose layout depends on the platform: those with pointers or `size_t`-like fields, directly or in nested structs. + // The sizes in the description JSON are for the platform the C bindings were generated on, so we can't check them for those. + for (bool changed = true; changed;) + { + changed = false; + for (const auto &[cpp_name, info] : types_by_cpp_name) + { + if (!info.IsExposedStruct() || platform_dependent_structs.contains(cpp_name)) + continue; + for (const auto &field : info.class_desc->fields) + { + if (field.is_static) + continue; + auto type = CTypeToJava(field.type); + if (type && type->platform_dependent) + { + platform_dependent_structs.insert(cpp_name); + changed = true; + break; + } + } + } + } + } + + std::string Generator::HandleDecl(const CInterop::BasicFuncLike &func, bool &ok) + { + ok = true; + std::vector layouts; + for (const auto ¶m : func.params) + { + for (const auto &c_param : param.c_params) + { + auto type = CTypeToJava(c_param.c_type); + if (!type || type->java == "void") + { + ok = false; + return {}; + } + layouts.push_back(type->layout); + } + } + auto ret_type = CTypeToJava(func.ret.c_type); + if (!ret_type) + { + ok = false; + return {}; + } + + std::string desc; + if (ret_type->java == "void") + desc = "java.lang.foreign.FunctionDescriptor.ofVoid(" + JoinNameParts(layouts, ", ") + ")"; + else + desc = "java.lang.foreign.FunctionDescriptor.of(" + ret_type->layout + (layouts.empty() ? "" : ", " + JoinNameParts(layouts, ", ")) + ")"; + return "static final java.lang.invoke.MethodHandle " + JavaIdent(func.c_name) + " = " + RuntimeClass("Ffi") + ".downcall(\"\", \"" + func.c_name + "\", " + desc + ");\n"; + } + + void Generator::EmitHandles() + { + auto AddHandle = [&](FileClass &file, const std::string &c_name, std::string decl) + { + // The group is only known here. + auto lib_iter = imported_lib_names.find(file.group); + if (lib_iter == imported_lib_names.end()) + throw std::runtime_error("No library name specified for the file group `" + file.group + "`, pass `--imported-split-lib-name " + file.group + " `."); + decl = Strings::Replace(decl, ".downcall(\"\", ", ".downcall(\"" + EscapeJavaString(file.group) + "\", "); + handle_paths[c_name] = HandleHolder(file, file.handles.size()) + "." + JavaIdent(c_name); + file.handles.push_back(std::move(decl)); + }; + + auto AddFunc = [&](FileClass &file, const CInterop::BasicFuncLike &func) + { + num_funcs_total++; + bool ok = false; + std::string decl = HandleDecl(func, ok); + if (!ok) + { + num_funcs_skipped++; + skipped_funcs.push_back(func.c_name); + return; + } + AddHandle(file, func.c_name, std::move(decl)); + }; + + for (const auto &func : c_desc.functions) + AddFunc(GetFileClass(func.output_file), func); + + for (auto &[cpp_name, info] : types_by_cpp_name) + { + if (!info.class_desc) + continue; + const auto &cl = *info.class_desc; + for (const auto &method : cl.methods) + AddFunc(*info.file, method); + for (const auto &field : cl.fields) + { + const_cast(field).ForEachAccessor([&](const CInterop::ClassField::Accessor &accessor) + { + AddFunc(*info.file, accessor); + }); + } + if (info.has_destroy) + { + std::string c_name = info.c_name + "_Destroy"; + AddHandle(*info.file, c_name, "static final java.lang.invoke.MethodHandle " + JavaIdent(c_name) + " = " + RuntimeClass("Ffi") + ".downcall(\"\", \"" + c_name + "\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS));\n"); + info.destroy_handle = handle_paths.at(c_name); + } + } + } + + void Generator::EmitRuntime() + { + const std::string pkg_line = "package " + base_package + ";\n\n"; + const std::string &hp = c_desc.helpers_prefix; + + // Native. + output_files[root.dir + "/Native.java"] = pkg_line + R"(/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +public interface Native +{ + /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ + java.lang.foreign.MemorySegment rawPointer(); +} +)"; + + // CppException. + output_files[root.dir + "/CppException.java"] = pkg_line + R"(/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +public class CppException extends RuntimeException +{ + private static final long serialVersionUID = 1; + + public CppException(String message) {super(message);} +} +)"; + + // CppObject. + output_files[root.dir + "/CppObject.java"] = pkg_line + R"(/** + * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * + * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), + * or is a reference to an object owned by something else. References returned by methods keep their owner alive. + */ +public abstract class CppObject implements Native, AutoCloseable +{ + // Runs the destructor from the cleaner. Must not reference the wrapper, or it would never be collected. + private static final class State implements Runnable + { + final java.lang.foreign.MemorySegment ptr; + final java.util.function.Consumer destroy; + volatile boolean owned = true; + + State(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy) + { + this.ptr = ptr; + this.destroy = destroy; + } + + @Override public void run() + { + if (owned) + { + owned = false; + destroy.accept(ptr); + } + } + } + + private final java.lang.foreign.MemorySegment ptr; + private final State state; // Null if not owned. + private final java.lang.ref.Cleaner.Cleanable cleanable; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + private boolean closed; + + /** + * Wraps a pointer from the C bindings. If `destroy` is not null, the object is owned and `destroy` is called on it when the wrapper dies. + * `owner` is kept alive as long as this wrapper is. + */ + @SuppressWarnings("this-escape") + protected CppObject(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy, Object owner) + { + if (ptr.address() == 0) + throw new NullPointerException("The C bindings returned a null pointer."); + this.ptr = ptr; + this.owner = owner; + if (destroy != null) + { + state = new State(ptr, destroy); + cleanable = Ffi.CLEANER.register(this, state); + } + else + { + state = null; + cleanable = null; + } + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() + { + if (closed) + throw new IllegalStateException("This object was closed or moved from."); + return ptr; + } + + /** Does this wrapper own its C++ object? */ + public final boolean isOwned() {return state != null && state.owned;} + + /** Destroys the C++ object now, if owned. The wrapper can't be used after this. Calling it again does nothing. */ + @Override public final void close() + { + closed = true; + if (cleanable != null) + cleanable.clean(); + } + + /** Gives up the ownership of the C++ object and returns its pointer. The caller is responsible for destroying it. The wrapper can't be used after this. */ + public final java.lang.foreign.MemorySegment release() + { + if (!isOwned()) + throw new IllegalStateException("This object is not owned by the wrapper, it can't be moved from."); + state.owned = false; + closed = true; + return ptr; + } +} +)"; + + // CppStruct. + output_files[root.dir + "/CppStruct.java"] = pkg_line + R"(/** + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * + * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), + * those returned by reference from the bindings point into memory owned by something else, which they keep alive. + */ +public abstract class CppStruct implements Native +{ + protected final java.lang.foreign.MemorySegment segment; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + + /** Wraps a segment of the exact struct size. `owner` is kept alive as long as this wrapper is. */ + protected CppStruct(java.lang.foreign.MemorySegment segment, Object owner) + { + this.segment = segment; + this.owner = owner; + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() {return segment;} +} +)"; + + // Ffi. + std::string ffi = pkg_line; + ffi += "/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */\n"; + ffi += "@SuppressWarnings(\"restricted\") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them.\n"; + ffi += "public final class Ffi\n{\n"; + ffi += " private Ffi() {}\n\n"; + ffi += " public static final java.lang.foreign.Linker LINKER = java.lang.foreign.Linker.nativeLinker();\n"; + ffi += " public static final java.lang.ref.Cleaner CLEANER = java.lang.ref.Cleaner.create();\n"; + ffi += " public static final boolean IS_WINDOWS = System.getProperty(\"os.name\", \"\").toLowerCase(java.util.Locale.ROOT).startsWith(\"windows\");\n\n"; + ffi += " /** The layout of C `long`: 4 bytes on Windows, 8 bytes elsewhere. The name lets `downcall()` widen it to a Java `long`. */\n"; + ffi += " public static final java.lang.foreign.ValueLayout C_LONG = (IS_WINDOWS ? java.lang.foreign.ValueLayout.JAVA_INT : java.lang.foreign.ValueLayout.JAVA_LONG).withName(\"mrbind_c_long\");\n\n"; + ffi += " /** How an object is passed to a C function. Matches the C enum `" + hp + "PassBy`. */\n"; + int i = 0; + for (std::string_view name : {"DEFAULT_CONSTRUCT", "COPY", "MOVE", "MOVE_AND_DESTROY", "DEFAULT_ARGUMENT", "NO_OBJECT"}) + ffi += " public static final int PASS_BY_" + std::string(name) + " = " + std::to_string(i++) + ";\n"; + ffi += "\n"; + + // The libraries. + ffi += " // The library of each file group of the C bindings, see `--split-library` in the C generator.\n"; + ffi += " private static final java.util.Map LIB_NAMES = java.util.Map.of("; + { + std::vector pairs; + std::map sorted(imported_lib_names.begin(), imported_lib_names.end()); + for (const auto &[group, lib] : sorted) + pairs.push_back("\"" + EscapeJavaString(group) + "\", \"" + EscapeJavaString(lib) + "\""); + ffi += JoinNameParts(pairs, ", "); + } + ffi += ");\n"; + ffi += " private static final java.util.Map LOOKUPS = new java.util.HashMap<>();\n\n"; + ffi += R"( /** + * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, + * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + */ + public static synchronized java.lang.foreign.SymbolLookup lookup(String group) + { + java.lang.foreign.SymbolLookup ret = LOOKUPS.get(group); + if (ret == null) + { + String lib = LIB_NAMES.get(group); + if (lib == null) + throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } + } + LOOKUPS.put(group, ret); + } + return ret; + } + + /** + * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. + * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. + */ + public static java.lang.invoke.MethodHandle downcall(String group, String name, java.lang.foreign.FunctionDescriptor desc) + { + java.util.Optional symbol = lookup(group).find(name); + java.lang.invoke.MethodHandle handle; + if (symbol.isPresent()) + { + handle = LINKER.downcallHandle(symbol.get(), desc); + } + else + { + java.lang.invoke.MethodType type = desc.toMethodType(); + if (desc.returnLayout().isPresent() && desc.returnLayout().get() instanceof java.lang.foreign.GroupLayout) + type = type.insertParameterTypes(0, java.lang.foreign.SegmentAllocator.class); // Struct returns take an allocator first. + UnsatisfiedLinkError error = new UnsatisfiedLinkError("The function `" + name + "` is missing from the library `" + LIB_NAMES.get(group) + "`."); + handle = java.lang.invoke.MethodHandles.throwException(type.returnType(), UnsatisfiedLinkError.class).bindTo(error); + handle = java.lang.invoke.MethodHandles.dropArguments(handle, 0, type.parameterList()); + } + java.lang.invoke.MethodType type = handle.type(); + boolean changed = false; + if (desc.returnLayout().isPresent() && isCLong(desc.returnLayout().get()) && type.returnType() == int.class) + { + type = type.changeReturnType(long.class); + changed = true; + } + java.util.List args = desc.argumentLayouts(); + int offset = type.parameterCount() - args.size(); // 1 if a `SegmentAllocator` was prepended for a struct return. + for (int i = 0; i < args.size(); i++) + { + if (isCLong(args.get(i)) && type.parameterType(i + offset) == int.class) + { + type = type.changeParameterType(i + offset, long.class); + changed = true; + } + } + if (changed) + handle = java.lang.invoke.MethodHandles.explicitCastArguments(handle, type); + return handle; + } + + private static boolean isCLong(java.lang.foreign.MemoryLayout layout) + { + return layout.name().isPresent() && layout.name().get().equals("mrbind_c_long"); + } + + public static long getCLong(java.lang.foreign.MemorySegment segment, long offset) + { + return IS_WINDOWS ? segment.get(java.lang.foreign.ValueLayout.JAVA_INT, offset) : segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, offset); + } + + public static void setCLong(java.lang.foreign.MemorySegment segment, long offset, long value) + { + if (IS_WINDOWS) + segment.set(java.lang.foreign.ValueLayout.JAVA_INT, offset, (int)value); + else + segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, offset, value); + } + + /** The pointer of a wrapper, or `NULL` for a null wrapper. */ + public static java.lang.foreign.MemorySegment ptr(Native object) + { + return object == null ? java.lang.foreign.MemorySegment.NULL : object.rawPointer(); + } + + /** The pointer of a wrapper. Throws if the wrapper is null. */ + public static java.lang.foreign.MemorySegment ptrNonNull(Native object, String name) + { + if (object == null) + throw new NullPointerException("The parameter `" + name + "` must not be null."); + return object.rawPointer(); + } + + // Allocates a single value, for the parameters passed by pointer. + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfBoolean layout, boolean value) {return allocator.allocate(layout).fill((byte)(value ? 1 : 0));} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfByte layout, byte value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfShort layout, short value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfInt layout, int value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfLong layout, long value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfFloat layout, float value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfDouble layout, double value) {return allocator.allocateFrom(layout, value);} + + /** Allocates the UTF-8 bytes of a string, without a null terminator. Returns `NULL` for null. */ + public static java.lang.foreign.MemorySegment utf8(java.lang.foreign.SegmentAllocator allocator, String str) + { + if (str == null) + return java.lang.foreign.MemorySegment.NULL; + byte[] bytes = str.getBytes(java.nio.charset.StandardCharsets.UTF_8); + return allocator.allocateFrom(java.lang.foreign.ValueLayout.JAVA_BYTE, bytes); + } + + /** The end pointer of a segment allocated by `utf8()`. `NULL` for `NULL`. */ + public static java.lang.foreign.MemorySegment end(java.lang.foreign.MemorySegment segment) + { + return segment.address() == 0 ? java.lang.foreign.MemorySegment.NULL : segment.asSlice(segment.byteSize()); + } + + /** Decodes a UTF-8 string from `size` bytes at `data`. */ + public static String string(java.lang.foreign.MemorySegment data, long size) + { + if (size == 0) + return ""; + return new String(data.reinterpret(size).toArray(java.lang.foreign.ValueLayout.JAVA_BYTE), java.nio.charset.StandardCharsets.UTF_8); + } + + /** Builds a struct layout with the C alignment rules: each field is aligned naturally, and the struct is padded to its alignment. */ + public static java.lang.foreign.StructLayout structLayout(String[] names, java.lang.foreign.MemoryLayout[] fields) + { + java.util.List elems = new java.util.ArrayList<>(); + long offset = 0, align = 1; + for (int i = 0; i < fields.length; i++) + { + long a = fields[i].byteAlignment(); + long pad = (a - offset % a) % a; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + elems.add(fields[i].withName(names[i])); + offset += pad + fields[i].byteSize(); + align = Math.max(align, a); + } + long pad = (align - offset % align) % align; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + if (elems.isEmpty()) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(1)); // Empty C++ structs have the size 1. + return java.lang.foreign.MemoryLayout.structLayout(elems.toArray(new java.lang.foreign.MemoryLayout[0])); + } + + /** Checks a struct layout against the size and alignment the C bindings were generated with. */ + public static void checkLayout(java.lang.foreign.StructLayout layout, long size, long alignment, String name) + { + if (layout.byteSize() != size || layout.byteAlignment() != alignment) + throw new IllegalStateException("The Java layout of `" + name + "` (" + layout.byteSize() + " bytes, aligned to " + layout.byteAlignment() + ") doesn't match C++ (" + size + " bytes, aligned to " + alignment + ")."); + } + + /** Allocates zeroed memory for a struct. It's freed when the segment becomes unreachable. */ + public static java.lang.foreign.MemorySegment allocStruct(java.lang.foreign.MemoryLayout layout) + { + return java.lang.foreign.Arena.ofAuto().allocate(layout); + } + + /** Converts a `Throwable` from `invokeExact()` to something that can be thrown from a method without a `throws` clause. */ + public static RuntimeException rethrow(Throwable e) + { + if (e instanceof RuntimeException r) + return r; + if (e instanceof Error err) + throw err; + return new RuntimeException(e); + } +)"; + + if (c_desc.exception_handling_enabled) + { + ffi += "\n // C++ exceptions are reported by the C bindings through a callback, which stores the message here until the wrapper checks it.\n"; + ffi += " private static final ThreadLocal PENDING_EXCEPTION = new ThreadLocal<>();\n\n"; + ffi += " private static void exceptionHandler(java.lang.foreign.MemorySegment messages, java.lang.foreign.MemorySegment typeNames, java.lang.foreign.MemorySegment userdata)\n {\n"; + ffi += " StringBuilder text = new StringBuilder();\n"; + ffi += " java.lang.foreign.MemorySegment array = messages.reinterpret(Long.MAX_VALUE);\n"; + ffi += " for (long i = 0;; i++)\n {\n"; + ffi += " java.lang.foreign.MemorySegment message = array.getAtIndex(java.lang.foreign.ValueLayout.ADDRESS, i);\n"; + ffi += " if (message.address() == 0)\n break;\n"; + ffi += " if (i > 0)\n text.append('\\n');\n"; + ffi += " text.append(message.reinterpret(Long.MAX_VALUE).getString(0));\n"; + ffi += " }\n"; + ffi += " PENDING_EXCEPTION.set(text.toString());\n }\n\n"; + ffi += " static\n {\n"; + ffi += " try\n {\n"; + ffi += " java.lang.invoke.MethodHandle handler = java.lang.invoke.MethodHandles.lookup().findStatic(Ffi.class, \"exceptionHandler\", java.lang.invoke.MethodType.methodType(void.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class));\n"; + ffi += " java.lang.foreign.MemorySegment stub = LINKER.upcallStub(handler, java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS), java.lang.foreign.Arena.global());\n"; + ffi += " downcall(\"\", \"" + hp + "SetExceptionHandler\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)).invokeExact(stub, java.lang.foreign.MemorySegment.NULL);\n"; + ffi += " }\n catch (Throwable e)\n {\n throw new ExceptionInInitializerError(e);\n }\n }\n\n"; + ffi += " /** Throws if the last call into the C bindings threw a C++ exception. */\n"; + ffi += " public static void checkException()\n {\n"; + ffi += " String message = PENDING_EXCEPTION.get();\n"; + ffi += " if (message != null)\n {\n PENDING_EXCEPTION.remove();\n throw new CppException(message);\n }\n }\n"; + } + ffi += "}\n"; + output_files[root.dir + "/Ffi.java"] = ffi; + } + + void Generator::EmitEnums() + { + for (const auto &[cpp_name, info] : types_by_cpp_name) + { + if (!info.IsEnum()) + continue; + const auto &en = *info.enum_desc; + auto prim = c_desc.platform_info.FindPrimitiveType(en.underlying_type); + const bool is_signed = !prim || prim->kind == PrimitiveTypeInfo::Kind::signed_integral; + const std::string &jt = info.enum_java_type; + + std::string out = "package " + info.module->package + ";\n\n"; + out += MakeDocComment(en.comment, 0, "The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants."); + out += "public final class " + info.java_unqual + "\n{\n"; + out += " public final " + jt + " value;\n\n"; + out += " public " + info.java_unqual + "(" + jt + " value) {this.value = value;}\n\n"; + std::set used; + for (std::string_view name : {"value", "of", "equals", "hashCode", "toString"}) + used.insert(std::string(name)); + std::vector> consts; // Java name, value expression. + for (const auto &elem : en.elems) + { + std::string value; + if (jt == "boolean") + value = elem.unsigned_value ? "true" : "false"; + else if (jt == "long") + value = (is_signed ? std::to_string(std::int64_t(elem.unsigned_value)) : std::to_string(std::int64_t(elem.unsigned_value))) + "L"; + else + { + std::int64_t v = is_signed ? std::int64_t(elem.unsigned_value) : std::int64_t(elem.unsigned_value); + // Truncate to the Java type, which is always signed. + if (jt == "byte") v = std::int8_t(std::uint8_t(v)); + else if (jt == "short") v = std::int16_t(std::uint16_t(v)); + else if (jt == "int") v = std::int32_t(std::uint32_t(v)); + value = jt == "int" ? std::to_string(v) : "(" + jt + ")" + std::to_string(v); + } + std::string name = UniqueName(used, JavaIdent(elem.name)); + out += MakeDocComment(elem.comment, 1); + out += " public static final " + info.java_unqual + " " + name + " = new " + info.java_unqual + "(" + value + ");\n"; + consts.emplace_back(name, elem.name); + } + out += "\n"; + out += " /** Returns the named constant with this value, or a new instance if there's none. */\n"; + out += " public static " + info.java_unqual + " of(" + jt + " value)\n {\n"; + for (const auto &[name, orig] : consts) + out += " if (value == " + name + ".value) return " + name + ";\n"; + out += " return new " + info.java_unqual + "(value);\n }\n\n"; + out += " @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof " + info.java_unqual + " o && o.value == value;}\n"; + out += " @java.lang.Override public int hashCode() {return " + (jt == "boolean" ? std::string("value ? 1 : 0") : jt == "long" ? std::string("java.lang.Long.hashCode(value)") : std::string(jt == "int" ? "value" : "(int)value")) + ";}\n"; + out += " @java.lang.Override public java.lang.String toString()\n {\n"; + for (const auto &[name, orig] : consts) + out += " if (value == " + name + ".value) return \"" + EscapeJavaString(orig) + "\";\n"; + out += " return \"" + EscapeJavaString(info.java_unqual) + "(\" + value + \")\";\n }\n"; + out += "}\n"; + output_files[info.module->dir + "/" + info.java_unqual + ".java"] = out; + } + } + + std::optional Generator::MapParam(const CInterop::FuncParam ¶m, const TypeInfo *this_type) + { + ParamStrings ret; + if (param.c_params.empty()) + { + ret.skip = true; + return ret; + } + + std::vector c_types; + std::vector ffi_types; + for (const auto &c_param : param.c_params) + { + c_types.push_back(&ParseTypeOrThrow(c_param.c_type)); + auto ffi_type = CTypeToJava(c_param.c_type); + if (!ffi_type || ffi_type->java == "void") + return {}; + ffi_types.push_back(*ffi_type); + } + + const std::string name = JavaIdent(param.name_or_placeholder); + const cppdecl::Type &cpp = ParseTypeOrThrow(param.cpp_type); + + // Classify the C++ type. + enum class CppShape {value, lref, rref, ptr, other}; + CppShape cpp_shape = CppShape::other; + cppdecl::Type cpp_base = cpp; + if (cpp.modifiers.empty()) + cpp_shape = CppShape::value; + else if (cpp.modifiers.size() == 1 && cpp.Is()) + { + cpp_shape = cpp.As()->kind == cppdecl::RefQualifier::rvalue ? CppShape::rref : CppShape::lref; + cpp_base.RemoveModifier(); + } + else if (cpp.modifiers.size() == 1 && cpp.Is()) + { + cpp_shape = CppShape::ptr; + cpp_base.RemoveModifier(); + } + cpp_base.RemoveQualifiers(cppdecl::CvQualifiers::const_); + const std::string cpp_base_str = cppdecl::ToCode(cpp_base, {}); + const bool cpp_is_optional = cpp_base_str.starts_with("std::optional<"); + const bool cpp_is_unique_ptr = cpp_base_str.starts_with("std::unique_ptr<"); + const bool cpp_is_string = cpp_base_str == "std::string" || cpp_base_str == "std::string_view" || cpp_base_str == "std::filesystem::path"; + + const std::string F = RuntimeClass("Ffi"); + + // Describes a single C parameter that is a pointer. + struct PointerInfo + { + bool is_const = false; + const TypeInfo *pointee_type = nullptr; // Null for builtin pointees. + std::optional pointee_builtin; // Set for builtin pointees. + }; + auto AnalyzePointer = [&](const cppdecl::Type &c_type) -> std::optional + { + if (c_type.modifiers.size() != 1 || !c_type.Is()) + return {}; + PointerInfo info; + info.is_const = c_type.IsConst(1); + std::string pointee_name = cppdecl::ToCode(c_type.simple_type.name, {}); + if (auto iter = types_by_c_name.find(pointee_name); iter != types_by_c_name.end()) + info.pointee_type = iter->second; + else if (c_type.simple_type.name.AsSingleWord() != "void" && !c_type.simple_type.name.AsSingleWord().empty()) + { + info.pointee_builtin = CTypeToJava(c_type, 1); + if (!info.pointee_builtin || info.pointee_builtin->java == "void") + return {}; + } + else + return {}; + return info; + }; + + const std::string pass_by = c_desc.helpers_prefix + "PassBy"; + + // The receiver. + if (param.is_this_param && c_types.size() == 1) + { + auto ptr = AnalyzePointer(*c_types[0]); + if (ptr && ptr->pointee_type && this_type && ptr->pointee_type == this_type) + { + ret.is_receiver = true; + ret.args.push_back("rawPointer()"); + ret.fences.push_back("this"); + return ret; + } + } + + // Pass-by-enum classes. + if (c_types.size() == 2 && c_types[0]->modifiers.empty() && cppdecl::ToCode(c_types[0]->simple_type.name, {}) == pass_by) + { + auto ptr = AnalyzePointer(*c_types[1]); + if (ptr && ptr->pointee_type && ptr->pointee_type->class_desc && !ptr->pointee_type->IsExposedStruct()) + { + const TypeInfo &cl = *ptr->pointee_type; + const bool movable = cl.has_destroy; + if (cl.copyable || movable) + { + const bool optional = cpp_is_optional || param.default_arg_affects_parameter_passing; + const std::string none_mode = F + (cpp_is_optional ? ".PASS_BY_NO_OBJECT" : ".PASS_BY_DEFAULT_ARGUMENT"); + ret.java_params.emplace_back(name, cl.java_path); + ret.object_param = name; + ret.fences.push_back(name); + if (cl.copyable) + { + if (optional) + { + ret.args.push_back("(int)(" + name + " == null ? " + none_mode + " : " + F + ".PASS_BY_COPY)"); + ret.args.push_back(F + ".ptr(" + name + ")"); + } + else + { + ret.args.push_back(F + ".PASS_BY_COPY"); + ret.args.push_back(F + ".ptrNonNull(" + name + ", \"" + name + "\")"); + } + } + else + { + // Non-copyable: the object is moved from and destroyed, see `CppObject.release()`. + if (optional) + { + ret.args.push_back("(int)(" + name + " == null ? " + none_mode + " : " + F + ".PASS_BY_MOVE_AND_DESTROY)"); + ret.args.push_back("(" + std::string(kMemorySegment) + ")(" + name + " == null ? " + std::string(kMemorySegment) + ".NULL : " + name + ".release())"); + } + else + { + ret.args.push_back(F + ".PASS_BY_MOVE_AND_DESTROY"); + ret.args.push_back("java.util.Objects.requireNonNull(" + name + ", \"" + name + "\").release()"); + } + } + return ret; + } + } + } + + // Strings. + if (c_types.size() == 2 && cpp_is_string && IsConstCharPtr(*c_types[0]) && IsConstCharPtr(*c_types[1])) + { + ret.java_params.emplace_back(name, "java.lang.String"); + ret.needs_arena = true; + if (param.default_arg_affects_parameter_passing) + ret.pre += std::string(kMemorySegment) + " __str_" + name + " = " + F + ".utf8(__arena, " + name + ");\n"; + else + ret.pre += std::string(kMemorySegment) + " __str_" + name + " = " + F + ".utf8(__arena, java.util.Objects.requireNonNull(" + name + ", \"" + name + "\"));\n"; + ret.args.push_back("__str_" + name); + ret.args.push_back(F + ".end(__str_" + name + ")"); + return ret; + } + + if (c_types.size() == 1) + { + const cppdecl::Type &ct = *c_types[0]; + const JavaType &ffi_type = ffi_types[0]; + + // By value: builtin types, enums, and exposed structs. + if (ct.modifiers.empty() && !param.default_arg_affects_parameter_passing) + { + const TypeInfo *type_info = ffi_type.type_info; + if (!type_info) + { + ret.java_params.emplace_back(name, ffi_type.java); + ret.args.push_back(name); + return ret; + } + if (type_info->IsEnum()) + { + ret.java_params.emplace_back(name, type_info->java_path); + ret.args.push_back("java.util.Objects.requireNonNull(" + name + ", \"" + name + "\").value"); + return ret; + } + if (type_info->IsExposedStruct()) + { + ret.java_params.emplace_back(name, type_info->java_path); + ret.args.push_back(F + ".ptrNonNull(" + name + ", \"" + name + "\")"); + ret.object_param = name; + ret.fences.push_back(name); + return ret; + } + } + + // Pointers. + if (auto ptr = AnalyzePointer(ct); ptr && !param.is_array_pointer && (cpp_shape == CppShape::value || cpp_shape == CppShape::lref || cpp_shape == CppShape::rref || cpp_shape == CppShape::ptr)) + { + const bool optional = cpp_shape == CppShape::ptr || param.default_arg_affects_parameter_passing; + + // `std::unique_ptr` takes ownership. + if (cpp_is_unique_ptr && ptr->pointee_type && ptr->pointee_type->has_destroy && !ptr->is_const) + { + ret.java_params.emplace_back(name, ptr->pointee_type->java_path); + ret.args.push_back("java.util.Objects.requireNonNull(" + name + ", \"" + name + "\").release()"); + return ret; + } + + // Classes and exposed structs: pass the pointer. + if (ptr->pointee_type && ptr->pointee_type->class_desc) + { + ret.java_params.emplace_back(name, ptr->pointee_type->java_path); + ret.args.push_back(optional ? F + ".ptr(" + name + ")" : F + ".ptrNonNull(" + name + ", \"" + name + "\")"); + ret.object_param = name; + ret.fences.push_back(name); + return ret; + } + + // Enums and builtins by const pointer: allocate a temporary. Mutable ones stay raw, Java can't write through them. + if (ptr->is_const && ptr->pointee_type && ptr->pointee_type->IsEnum() && !ptr->pointee_type->enum_is_c_long) + { + const TypeInfo &en = *ptr->pointee_type; + ret.java_params.emplace_back(name, en.java_path); + ret.needs_arena = true; + std::string alloc = F + ".alloc(__arena, " + en.enum_layout + ", " + name + ".value)"; + ret.args.push_back(optional ? "(" + std::string(kMemorySegment) + ")(" + name + " == null ? " + std::string(kMemorySegment) + ".NULL : " + alloc + ")" : F + ".alloc(__arena, " + en.enum_layout + ", java.util.Objects.requireNonNull(" + name + ", \"" + name + "\").value)"); + return ret; + } + if (ptr->is_const && ptr->pointee_builtin && !ptr->pointee_builtin->is_pointer && !ptr->pointee_builtin->is_c_long && !ptr->pointee_builtin->type_info && ptr->pointee_builtin->array_dims.empty()) + { + const JavaType &b = *ptr->pointee_builtin; + ret.needs_arena = true; + if (optional) + { + ret.java_params.emplace_back(name, Boxed(b.java)); + ret.args.push_back("(" + std::string(kMemorySegment) + ")(" + name + " == null ? " + std::string(kMemorySegment) + ".NULL : " + F + ".alloc(__arena, " + b.layout + ", " + name + "))"); + } + else + { + ret.java_params.emplace_back(name, b.java); + ret.args.push_back(F + ".alloc(__arena, " + b.layout + ", " + name + ")"); + } + return ret; + } + } + } + + // Fallback: raw C types. + for (std::size_t i = 0; i < param.c_params.size(); i++) + { + std::string raw_name = JavaIdent(param.c_params[i].name); + ret.java_params.emplace_back(raw_name, ffi_types[i].java); + ret.args.push_back(raw_name); + } + ret.is_raw = true; + return ret; + } + + std::optional Generator::MapReturn(const CInterop::FuncReturn &ret) + { + ReturnStrings out; + auto ffi_type = CTypeToJava(ret.c_type); + if (!ffi_type) + return {}; + out.java_type = ffi_type->java; + out.handle_type = ffi_type->java; + out.convert = "__ret"; + if (ffi_type->java == "void") + return out; + + const cppdecl::Type &ct = ParseTypeOrThrow(ret.c_type); + const std::string F = RuntimeClass("Ffi"); + + if (ct.modifiers.empty()) + { + // Builtin, enum, or exposed struct by value. + if (ffi_type->type_info && ffi_type->type_info->IsEnum()) + { + out.java_type = ffi_type->type_info->java_path; + out.convert = ffi_type->type_info->java_path + ".of(__ret)"; + } + else if (ffi_type->type_info && ffi_type->type_info->IsExposedStruct()) + { + out.java_type = ffi_type->type_info->java_path; + out.returns_struct = true; + out.convert = "new " + ffi_type->type_info->java_path + "(__ret, null)"; + } + return out; + } + + if (ct.modifiers.size() == 1 && ct.Is() && !ret.is_array_pointer) + { + const bool is_const = ct.IsConst(1); + std::string pointee_name = cppdecl::ToCode(ct.simple_type.name, {}); + auto type_iter = types_by_c_name.find(pointee_name); + const TypeInfo *pointee_type = type_iter != types_by_c_name.end() ? type_iter->second : nullptr; + std::optional pointee_builtin; + if (!pointee_type && !ct.simple_type.name.AsSingleWord().empty() && ct.simple_type.name.AsSingleWord() != "void") + pointee_builtin = CTypeToJava(ct, 1); + + const cppdecl::Type &cpp = ParseTypeOrThrow(ret.cpp_type); + cppdecl::Type cpp_base = cpp; + const bool cpp_is_ref = cpp.modifiers.size() == 1 && cpp.Is(); + const bool cpp_is_ptr = cpp.modifiers.size() == 1 && cpp.Is(); + if (cpp_is_ref || cpp_is_ptr) + cpp_base.RemoveModifier(); + cpp_base.RemoveQualifiers(cppdecl::CvQualifiers::const_); + const std::string cpp_base_str = cppdecl::ToCode(cpp_base, {}); + + if (pointee_type && pointee_type->class_desc && !pointee_type->IsExposedStruct()) + { + // Owned objects. + if (pointee_type->has_destroy && !is_const && (cpp.modifiers.empty() || cpp_base_str.starts_with("std::unique_ptr<"))) + { + out.java_type = pointee_type->java_path; + out.convert = "new " + pointee_type->java_path + "(__ret, true, null)"; + return out; + } + if (cpp_is_ref || cpp_is_ptr) + { + out.java_type = pointee_type->java_path; + std::string make = "new " + pointee_type->java_path + "(__ret, " + (pointee_type->has_destroy ? "false, " : "") + "__owner)"; + out.convert = cpp_is_ptr ? "__ret.address() == 0 ? null : " + make : make; + return out; + } + } + else if (pointee_type && pointee_type->IsExposedStruct() && (cpp_is_ref || cpp_is_ptr)) + { + out.java_type = pointee_type->java_path; + std::string make = "new " + pointee_type->java_path + "(__ret.reinterpret(" + pointee_type->java_path + ".LAYOUT.byteSize()), __owner)"; + out.convert = cpp_is_ptr ? "__ret.address() == 0 ? null : " + make : make; + return out; + } + else if (pointee_type && pointee_type->IsEnum() && is_const && !pointee_type->enum_is_c_long && (cpp_is_ref || cpp_is_ptr || cpp.modifiers.empty())) + { + out.java_type = pointee_type->java_path; + std::string make = pointee_type->java_path + ".of(__ret.reinterpret(" + pointee_type->enum_size + ").get(" + pointee_type->enum_layout + ", 0))"; + out.convert = cpp_is_ptr ? "__ret.address() == 0 ? null : " + make : make; + return out; + } + else if (pointee_builtin && !pointee_builtin->is_pointer && !pointee_builtin->type_info && pointee_builtin->array_dims.empty() && is_const && (cpp_is_ref || cpp_is_ptr || cpp.modifiers.empty())) + { + std::string read = pointee_builtin->is_c_long + ? F + ".getCLong(__ret.reinterpret(8), 0)" + : "__ret.reinterpret(" + pointee_builtin->size_expr + ").get(" + pointee_builtin->layout + ", 0)"; + if (cpp_is_ptr) + { + out.java_type = Boxed(pointee_builtin->java); + out.convert = "__ret.address() == 0 ? null : (" + out.java_type + ")" + read; + } + else + { + out.java_type = pointee_builtin->java; + out.convert = read; + } + return out; + } + } + + out.is_raw = ffi_type->is_pointer; + return out; + } + + std::optional Generator::PrepareFunc(const CInterop::BasicFuncLike &func, const TypeInfo *this_type, bool is_ctor, std::string preferred_name, std::string fallback_name) + { + if (!handle_paths.contains(func.c_name)) + return {}; // Skipped already. + + PreparedFunc ret; + ret.func = &func; + ret.this_type = this_type; + ret.is_ctor = is_ctor; + ret.is_static = true; + ret.preferred_name = std::move(preferred_name); + ret.fallback_name = std::move(fallback_name); + + std::vector sig_parts; + for (const auto ¶m : func.params) + { + auto mapped = MapParam(param, this_type); + if (!mapped) + { + num_funcs_skipped++; + skipped_funcs.push_back(func.c_name); + return {}; + } + if (mapped->skip) + continue; + if (mapped->is_receiver) + ret.is_static = false; + ret.is_raw |= mapped->is_raw; + for (const auto &[pname, ptype] : mapped->java_params) + sig_parts.push_back(ptype); + ret.params.push_back(std::move(*mapped)); + } + ret.signature = JoinNameParts(sig_parts, ","); + + auto mapped_ret = MapReturn(func.ret); + if (!mapped_ret) + { + num_funcs_skipped++; + skipped_funcs.push_back(func.c_name); + return {}; + } + ret.ret = std::move(*mapped_ret); + ret.is_raw |= ret.ret.is_raw; + if (ret.is_raw) + num_funcs_raw++; + return ret; + } + + void Generator::ResolveNames(std::vector &funcs, std::set &used_keys, std::vector &names) + { + // How many functions share a preferred name and a signature. + std::map, int> counts; + for (const auto &func : funcs) + counts[{func.preferred_name, func.signature}]++; + + names.clear(); + for (auto &func : funcs) + { + std::string name; + if (!func.preferred_name.empty() && counts[{func.preferred_name, func.signature}] == 1) + name = func.preferred_name; + else + { + name = func.fallback_name; + if (func.is_ctor) + func.is_ctor = false; // Becomes a static factory. + } + // Keep the signatures unique, in case the fallback names clash too. + std::string base = name; + for (int i = 2; !used_keys.insert(name + "(" + func.signature + ")").second; i++) + { + name = base + "_" + std::to_string(i); + if (func.is_ctor) + func.is_ctor = false; + } + names.push_back(name); + } + } + + void Generator::EmitPrepared(std::string &out_module, const PreparedFunc &func, const std::string &name, int indent) + { + const CInterop::BasicFuncLike &f = *func.func; + const std::string F = RuntimeClass("Ffi"); + const bool handle_exceptions = c_desc.exception_handling_enabled && !f.is_noexcept; + + std::string extra_doc = "Calls `" + f.c_name + "()`."; + if (func.is_raw) + extra_doc += " Some types are raw C types, see the C bindings for the details."; + CInterop::Comment comment; + comment.c_style = f.comment.c_style + f.comment_extra_lifetimes.c_style; + std::string out = MakeDocComment(comment, 0, extra_doc); + if (f.is_deprecated) + out += "@java.lang.Deprecated\n"; + + // The parameter list. + std::string params_decl, params_pass; + bool needs_arena = false; + std::vector fences; + std::string pre; + std::string object_param; // For `__owner`. + int num_object_params = 0; + for (const auto ¶m : func.params) + { + for (const auto &[pname, ptype] : param.java_params) + { + if (!params_decl.empty()) + { + params_decl += ", "; + params_pass += ", "; + } + params_decl += ptype + " " + pname; + params_pass += pname; + } + needs_arena |= param.needs_arena; + pre += param.pre; + for (const auto &fence : param.fences) + fences.push_back(fence); + if (!param.object_param.empty()) + { + object_param = param.object_param; + num_object_params++; + } + } + std::string owner = func.is_static ? (num_object_params == 1 ? object_param : "null") : "this"; + + // The call. + std::string args; + if (func.ret.returns_struct) + args = "(java.lang.foreign.SegmentAllocator)" + std::string(kArena) + ".ofAuto()"; + for (const auto ¶m : func.params) + { + for (const auto &arg : param.args) + { + if (!args.empty()) + args += ", "; + args += arg; + } + } + std::string call = handle_paths.at(f.c_name) + ".invokeExact(" + args + ")"; + std::string body = pre; + if (func.ret.handle_type == "void") + body += call + ";\n"; + else + body += func.ret.handle_type + " __ret = (" + func.ret.handle_type + ")" + call + ";\n"; + if (handle_exceptions) + body += F + ".checkException();\n"; + if (func.is_ctor) + body += "return __ret;\n"; // The constructor wraps it. + else if (func.ret.handle_type != "void") + { + if (func.ret.convert.find("__owner") != std::string::npos) + body += "java.lang.Object __owner = " + owner + ";\n"; + body += "return " + func.ret.convert + ";\n"; + } + + std::string wrapped; + wrapped += needs_arena ? "try (" + std::string(kArena) + " __arena = " + std::string(kArena) + ".ofConfined())\n{\n" : "try\n{\n"; + wrapped += Indent(body, 1); + wrapped += "}\ncatch (java.lang.Throwable __e)\n{\n throw " + F + ".rethrow(__e);\n}\n"; + if (!fences.empty()) + { + wrapped += "finally\n{\n"; + for (const auto &fence : fences) + wrapped += " java.lang.ref.Reference.reachabilityFence(" + fence + ");\n"; + wrapped += "}\n"; + } + + if (func.is_ctor) + { + // A real constructor, calling a static helper that does the work. + const std::string &cl = func.this_type->java_unqual; + std::string helper = "__ctor_" + name; + out += "public " + cl + "(" + params_decl + ")\n{\n"; + if (func.this_type->IsExposedStruct()) + out += " super(" + helper + "(" + params_pass + "), null);\n"; + else + out += " this(" + helper + "(" + params_pass + "), true, null);\n"; + out += "}\n\n"; + out += "private static " + std::string(kMemorySegment) + " " + helper + "(" + params_decl + ")\n{\n" + Indent(wrapped, 1) + "}\n\n"; + } + else + { + out += "public " + std::string(func.is_static ? "static " : "") + func.ret.java_type + " " + name + "(" + params_decl + ")\n{\n" + Indent(wrapped, 1) + "}\n\n"; + } + + out_module += Indent(out, indent); + } + + std::string OperatorName(std::string_view token, bool is_post_incr_or_decr) + { + // The same names the C generator uses, in camel case: `!=` -> `opNotEqual`, `+=` -> `opAddAssign`. + std::string ident = std::string(cppdecl::TokenToIdentifier(token, true)); + if (is_post_incr_or_decr) + ident = "post_" + ident; + std::string ret = "op"; + bool upper = true; + for (char ch : ident) + { + if (ch == '_') + { + upper = true; + continue; + } + ret += upper ? char(std::toupper((unsigned char)ch)) : ch; + upper = false; + } + return JavaIdent(ret); + } + + void Generator::EmitClasses() + { + const std::string F = RuntimeClass("Ffi"); + + for (auto &[cpp_name, info] : types_by_cpp_name) + { + if (!info.class_desc) + continue; + const auto &cl = *info.class_desc; + const std::string &def_name = info.java_unqual; + + std::string out = "package " + info.module->package + ";\n\n"; + std::string members; // The class body. + std::set used_keys; // `name(signature)` of the methods. + for (std::string_view key : {"equals(java.lang.Object)", "hashCode()", "toString()", "getClass()", "notify()", "notifyAll()", "wait()", "wait(long)", "wait(long,int)", "finalize()", "clone()", "rawPointer()"}) + used_keys.insert(std::string(key)); + + if (info.IsExposedStruct()) + { + used_keys.insert("copy()"); + used_keys.insert("set(" + info.java_path + ")"); + + out += MakeDocComment(cl.comment, 0, "Has the same layout as the C++ struct, the fields are accessed in place in native memory."); + out += "@java.lang.SuppressWarnings({\"restricted\", \"cast\"})\npublic final class " + def_name + " extends " + RuntimeClass("CppStruct") + "\n{\n"; + + // The layout. + std::vector field_names, field_layouts; + struct FieldInfo + { + const CInterop::ClassField *field = nullptr; + JavaType type; + std::string java_name; + }; + std::vector fields; + std::set used_field_names; + for (const auto &field : cl.fields) + { + if (field.is_static) + continue; + auto type = CTypeToJava(field.type); + if (!type || type->java == "void") + throw std::runtime_error("Can't express the type `" + field.type + "` of field `" + field.name + "` of exposed struct `" + cpp_name + "` in Java."); + FieldInfo &fi = fields.emplace_back(); + fi.field = &field; + fi.type = *type; + fi.java_name = UniqueName(used_field_names, JavaIdent(field.name)); + field_names.push_back("\"" + EscapeJavaString(fi.java_name) + "\""); + field_layouts.push_back(type->layout); + } + members += "/** The native layout of the struct. */\n"; + members += "public static final java.lang.foreign.StructLayout LAYOUT = " + F + ".structLayout(new java.lang.String[]{" + JoinNameParts(field_names, ", ") + "}, new " + std::string(kMemoryLayout) + "[]{" + JoinNameParts(field_layouts, ", ") + "});\n"; + for (const auto &fi : fields) + members += "public static final long OFF_" + fi.java_name + " = LAYOUT.byteOffset(" + std::string(kMemoryLayout) + ".PathElement.groupElement(\"" + EscapeJavaString(fi.java_name) + "\"));\n"; + if (cl.size_and_alignment && !platform_dependent_structs.contains(cpp_name)) + members += "static {" + F + ".checkLayout(LAYOUT, " + std::to_string(cl.size_and_alignment->size) + ", " + std::to_string(cl.size_and_alignment->alignment) + ", \"" + EscapeJavaString(cpp_name) + "\");}\n"; + else if (cl.size_and_alignment) + members += "// No layout check: this struct has platform-sized fields, and the sizes in the description JSON are for the platform the C bindings were generated on.\n"; + members += "\n"; + + members += "/** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */\n"; + members += "public " + def_name + "(" + std::string(kMemorySegment) + " segment, java.lang.Object owner) {super(segment, owner);}\n\n"; + members += "/** A copy of the struct, in its own memory. */\n"; + members += "public " + def_name + " copy() {return new " + def_name + "(" + F + ".allocStruct(LAYOUT).copyFrom(segment), null);}\n\n"; + members += "/** Overwrites the contents with those of another struct. */\n"; + members += "public void set(" + def_name + " other) {segment.copyFrom(" + F + ".ptrNonNull(other, \"other\"));}\n\n"; + + // The field accessors. + for (const auto &fi : fields) + { + const JavaType &t = fi.type; + const std::string cap = Capitalize(fi.java_name); + std::string doc = MakeDocComment(fi.field->comment, 0); + + // The element type and the offset expression for arrays. + const JavaType &elem = t.array_dims.empty() ? t : *t.array_elem; + std::string index_params, index_pass, offset = "OFF_" + fi.java_name; + if (!t.array_dims.empty()) + { + std::string flat; + for (std::size_t i = 0; i < t.array_dims.size(); i++) + { + std::string idx = "i" + std::to_string(i); + index_params += "int " + idx + ", "; + index_pass += "java.util.Objects.checkIndex(" + idx + ", " + std::to_string(t.array_dims[i]) + ")"; + flat = i == 0 ? index_pass : "(" + flat + ") * " + std::to_string(t.array_dims[i]) + " + " + index_pass; + index_pass.clear(); + } + offset += " + (" + flat + ") * " + elem.size_expr; + } + auto Params = [&](const std::string &extra) + { + if (extra.empty()) + return index_params.empty() ? index_params : index_params.substr(0, index_params.size() - 2); + return index_params + extra; + }; + + std::string key_get = fi.java_name + "(" + (t.array_dims.empty() ? "" : JoinNameParts(std::vector(t.array_dims.size(), "int"), ",")) + ")"; + used_keys.insert(key_get); + + if (elem.type_info && elem.type_info->IsExposedStruct()) + { + const std::string &st = elem.type_info->java_path; + members += doc + "public " + st + " " + fi.java_name + "(" + Params("") + ") {return new " + st + "(segment.asSlice(" + offset + ", " + st + ".LAYOUT.byteSize()), this);}\n"; + members += "public void set" + cap + "(" + Params(st + " value") + ") {segment.asSlice(" + offset + ", " + st + ".LAYOUT.byteSize()).copyFrom(" + F + ".ptrNonNull(value, \"value\"));}\n\n"; + used_keys.insert("set" + cap + "(" + JoinNameParts(std::vector(t.array_dims.size(), "int"), ",") + (t.array_dims.empty() ? "" : ",") + st + ")"); + } + else if (elem.type_info && elem.type_info->IsEnum()) + { + const TypeInfo &en = *elem.type_info; + std::string read = en.enum_is_c_long ? F + ".getCLong(segment, " + offset + ")" : "segment.get(" + en.enum_layout + ", " + offset + ")"; + std::string write = en.enum_is_c_long ? F + ".setCLong(segment, " + offset + ", value.value)" : "segment.set(" + en.enum_layout + ", " + offset + ", value.value)"; + members += doc + "public " + en.java_path + " " + fi.java_name + "(" + Params("") + ") {return " + en.java_path + ".of(" + read + ");}\n"; + members += "public void set" + cap + "(" + Params(en.java_path + " value") + ") {" + write + ";}\n\n"; + } + else + { + std::string read = elem.is_c_long ? F + ".getCLong(segment, " + offset + ")" : "segment.get(" + elem.layout + ", " + offset + ")"; + std::string write = elem.is_c_long ? F + ".setCLong(segment, " + offset + ", value)" : "segment.set(" + elem.layout + ", " + offset + ", value)"; + members += doc + "public " + elem.java + " " + fi.java_name + "(" + Params("") + ") {return " + read + ";}\n"; + members += "public void set" + cap + "(" + Params(elem.java + " value") + ") {" + write + ";}\n\n"; + } + } + } + else + { + std::string note = info.has_destroy + ? "Instances created here own their C++ objects, see `CppObject`." + : "Can't be created from Java, only references to it are used."; + out += MakeDocComment(cl.comment, 0, note); + out += "@java.lang.SuppressWarnings({\"restricted\", \"cast\"})\npublic final class " + def_name + " extends " + RuntimeClass("CppObject") + "\n{\n"; + for (std::string_view key : {"close()", "release()", "isOwned()"}) + used_keys.insert(std::string(key)); + + if (info.has_destroy) + { + members += "/** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */\n"; + members += "public " + def_name + "(" + std::string(kMemorySegment) + " ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? " + def_name + "::__destroy : null, owner);}\n\n"; + members += "private static void __destroy(" + std::string(kMemorySegment) + " ptr)\n{\n try\n {\n " + info.destroy_handle + ".invokeExact(ptr);\n }\n catch (java.lang.Throwable e)\n {\n throw " + F + ".rethrow(e);\n }\n}\n\n"; + } + else + { + members += "/** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */\n"; + members += "public " + def_name + "(" + std::string(kMemorySegment) + " ptr, java.lang.Object owner) {super(ptr, null, owner);}\n\n"; + } + } + + // Methods. + std::vector funcs; + const std::string class_prefix = info.c_name + "_"; + + // The fallback name derived from the C name, which is unique. + auto FallbackName = [&](const std::string &c_name, bool is_operator) -> std::string + { + (void)this; + std::string suffix; + if (c_name.starts_with(class_prefix)) + return JavaMethodName(c_name.substr(class_prefix.size())); + suffix = c_name; + if (suffix.starts_with(c_desc.helpers_prefix)) + suffix.erase(0, c_desc.helpers_prefix.size()); + // Remove the class name from operator names. + if (auto pos = suffix.find(info.c_name); pos != std::string::npos) + suffix.erase(pos, info.c_name.size()); + while (suffix.ends_with('_')) + suffix.pop_back(); + while (suffix.starts_with('_')) + suffix.erase(0, 1); + // Collapse the repeated underscores left by the removal. + std::string collapsed; + for (char ch : suffix) + { + if (ch == '_' && !collapsed.empty() && collapsed.back() == '_') + continue; + collapsed += ch; + } + return JavaIdent((is_operator ? "op" : "") + Capitalize(collapsed)); + }; + + for (const auto &method : cl.methods) + { + std::string preferred, fallback; + bool is_ctor = false; + if (auto reg = std::get_if(&method.var)) + { + preferred = JavaIdent(reg->name); + fallback = FallbackName(method.c_name, false); + } + else if (std::holds_alternative(method.var)) + { + is_ctor = info.has_destroy || info.IsExposedStruct(); + preferred = is_ctor ? "" : ""; + fallback = FallbackName(method.c_name, false); + } + else + { + const bool is_operator = !method.c_name.starts_with(class_prefix); + fallback = FallbackName(method.c_name, is_operator); + if (auto op = std::get_if(&method.var); op && is_operator) + preferred = OperatorName(op->token, op->is_post_incr_or_decr); + } + // Constructors return the new object by value, which the mapping handles as an owned pointer or a struct. + if (auto prepared = PrepareFunc(method, &info, is_ctor, preferred, fallback)) + { + // Only methods with the expected shape can be real constructors. + if (prepared->is_ctor && !(prepared->is_static && prepared->ret.java_type == info.java_path && (info.IsExposedStruct() ? prepared->ret.returns_struct : prepared->ret.convert.starts_with("new ")))) + { + prepared->is_ctor = false; + prepared->preferred_name.clear(); + } + funcs.push_back(std::move(*prepared)); + } + } + + for (const auto &field : cl.fields) + { + if (info.IsExposedStruct() && !field.is_static) + continue; + std::string field_name = JavaIdent(field.name); + const CInterop::ClassField::Accessor *getter = field.getter_const ? &*field.getter_const : field.getter_mutable ? &*field.getter_mutable : nullptr; + if (getter) + { + if (auto prepared = PrepareFunc(*getter, &info, false, field_name, FallbackName(getter->c_name, false))) + funcs.push_back(std::move(*prepared)); + } + if (field.setter) + { + if (auto prepared = PrepareFunc(*field.setter, &info, false, JavaIdent("set" + Capitalize(field.name)), FallbackName(field.setter->c_name, false))) + funcs.push_back(std::move(*prepared)); + } + if (field.getter_array_size) + { + if (auto prepared = PrepareFunc(*field.getter_array_size, &info, false, JavaIdent(field.name + "Size"), FallbackName(field.getter_array_size->c_name, false))) + funcs.push_back(std::move(*prepared)); + } + } + + std::vector names; + ResolveNames(funcs, used_keys, names); + for (std::size_t i = 0; i < funcs.size(); i++) + EmitPrepared(members, funcs[i], funcs[i].is_ctor ? funcs[i].fallback_name : names[i], 0); + + // The default constructor of an exposed struct without one in C++: zeroed memory. + if (info.IsExposedStruct() && !used_keys.contains("()")) + { + members += "/** Zero-initialized. */\n"; + members += "public " + def_name + "() {super(" + F + ".allocStruct(LAYOUT), null);}\n\n"; + } + + // Conveniences for `std::string`. + if (cpp_name == "std::string") + { + auto data_iter = handle_paths.find(info.c_name + "_data"); + auto size_iter = handle_paths.find(info.c_name + "_size"); + if (data_iter != handle_paths.end() && size_iter != handle_paths.end()) // `toString()` is reserved, so no generated method has that name. + { + members += "/** The contents, decoded as UTF-8. */\n"; + members += "@java.lang.Override public java.lang.String toString()\n{\n try\n {\n"; + members += " return " + F + ".string((" + std::string(kMemorySegment) + ")" + data_iter->second + ".invokeExact(rawPointer()), (long)" + size_iter->second + ".invokeExact(rawPointer()));\n"; + members += " }\n catch (java.lang.Throwable e)\n {\n throw " + F + ".rethrow(e);\n }\n finally\n {\n java.lang.ref.Reference.reachabilityFence(this);\n }\n}\n\n"; + } + } + + while (members.ends_with("\n\n")) + members.pop_back(); + out += Indent(members, 1); + out += "}\n"; + output_files[info.module->dir + "/" + def_name + ".java"] = out; + } + } + + void Generator::EmitFreeFunctions() + { + struct FuncInfo + { + Module *module = nullptr; + std::string simple_name; // The C++ name, empty for operators. + std::string c_derived_name; // Unique, derived from the C name. + }; + std::vector infos; + + for (const auto &func : c_desc.functions) + { + FuncInfo &info = infos.emplace_back(); + + std::string qual_name; + if (auto reg = std::get_if(&func.var)) + qual_name = reg->name; + else if (auto op = std::get_if(&func.var)) + qual_name = op->name; + + std::vector ns_parts; + { + std::string_view view = qual_name; + auto parsed = cppdecl::ParseQualifiedName(view); + if (auto name = std::get_if(&parsed); name && view.empty()) + { + for (std::size_t i = 0; i + 1 < name->parts.size(); i++) + ns_parts.push_back(PartToString(name->parts[i])); + if (std::holds_alternative(func.var) && !name->parts.empty()) + info.simple_name = JavaIdent(PartToString(name->parts.back())); + } + } + info.module = &GetModuleForNamespace(ns_parts.empty() ? forced_namespace : ns_parts); + + // Derive the name from the C name, which is unique. + std::string suffix = func.c_name; + std::string ns_c_prefix = JoinNameParts(ns_parts, "_") + "_"; + bool is_operator = std::holds_alternative(func.var); + if (!ns_parts.empty() && suffix.starts_with(ns_c_prefix)) + suffix.erase(0, ns_c_prefix.size()); + else if (suffix.starts_with(c_desc.helpers_prefix)) + suffix.erase(0, c_desc.helpers_prefix.size()); + info.c_derived_name = is_operator ? JavaIdent("op" + Capitalize(suffix)) : JavaMethodName(suffix); + if (auto op = std::get_if(&func.var)) + info.simple_name = OperatorName(op->token, op->is_post_incr_or_decr); + } + + // Prepare per module, then resolve the names within each. + std::map> per_module; + for (std::size_t i = 0; i < c_desc.functions.size(); i++) + { + if (auto prepared = PrepareFunc(c_desc.functions[i], nullptr, false, infos[i].simple_name, infos[i].c_derived_name)) + per_module[infos[i].module].push_back(std::move(*prepared)); + } + for (auto &[module, funcs] : per_module) + { + std::set used_keys; + for (std::string_view key : {"equals(java.lang.Object)", "hashCode()", "toString()", "getClass()", "notify()", "notifyAll()", "wait()", "wait(long)", "wait(long,int)", "finalize()", "clone()"}) + used_keys.insert(std::string(key)); + std::vector names; + ResolveNames(funcs, used_keys, names); + for (std::size_t i = 0; i < funcs.size(); i++) + EmitPrepared(module->free_funcs, funcs[i], names[i], 0); + } + } + + void Generator::EmitFiles() + { + // The `ffi` classes, one per C file. + // A directory of the C bindings becomes a package, and a package can't share a name with a class in the same parent package. + std::set dir_packages; + for (const auto &[relative_name, file] : file_classes) + { + std::string pkg = base_package + ".ffi"; + for (std::size_t i = 0; i + 1 < file.idents.size(); i++) + { + pkg += "." + file.idents[i]; + dir_packages.insert(pkg); + } + } + for (auto &[relative_name, file] : file_classes) + { + if (dir_packages.contains(file.java_path)) + { + // Rename the class, and fix up the handle paths pointing to it. + std::string old_path = file.java_path; + file.idents.back() += '_'; + file.java_path = base_package + ".ffi." + JoinNameParts(file.idents, "."); + for (auto &[c_name, path] : handle_paths) + { + if (path.starts_with(old_path + ".")) + path = file.java_path + path.substr(old_path.size()); + } + for (auto &[cpp_name, info] : types_by_cpp_name) + { + if (info.destroy_handle.starts_with(old_path + ".")) + info.destroy_handle = file.java_path + info.destroy_handle.substr(old_path.size()); + } + } + } + // The safe layer is emitted after this, so the handle paths are final there. + + for (const auto &[relative_name, file] : file_classes) + { + std::string pkg = base_package + ".ffi"; + std::string dir = root.dir + "/ffi"; + for (std::size_t i = 0; i + 1 < file.idents.size(); i++) + { + pkg += "." + file.idents[i]; + dir += "/" + file.idents[i]; + } + std::string out = "package " + pkg + ";\n\n"; + out += "/** The downcall handles of the C bindings file `" + relative_name + "`. Generated by mrbind, do not edit. */\n"; + out += "public final class " + file.idents.back() + "\n{\n"; + out += " private " + file.idents.back() + "() {}\n"; + for (std::size_t i = 0; i < file.handles.size(); i += handles_per_chunk) + { + out += "\n public static final class H" + std::to_string(i / handles_per_chunk) + "\n {\n"; + out += " private H" + std::to_string(i / handles_per_chunk) + "() {}\n\n"; + for (std::size_t j = i; j < file.handles.size() && j < i + handles_per_chunk; j++) + out += " public " + file.handles[j]; + out += " }\n"; + } + out += "}\n"; + output_files[dir + "/" + file.idents.back() + ".java"] = out; + } + + // A nested namespace package can't share a name with a class in its parent package. + auto CheckModule = [&](auto &self, const Module &module) -> void + { + for (const auto &[name, child] : module.children) + { + if (module.used_names.contains(name)) + throw std::runtime_error("The nested namespace package `" + child.package + "` clashes with a class of the same name. Rename one of them in C++ or adjust `--force-namespace`."); + self(self, child); + } + }; + if (root.children.contains("ffi")) + throw std::runtime_error("A namespace package clashes with the `ffi` package."); + CheckModule(CheckModule, root); + } + + void Generator::Generate() + { + CollectTypes(); + EmitHandles(); + EmitRuntime(); + EmitEnums(); + EmitFiles(); // Before the classes, since this can rename the `ffi` classes. + EmitClasses(); + EmitFreeFunctions(); + // The `Functions` classes of the namespace packages. + auto WriteFunctions = [&](auto &self, const Module &module) -> void + { + for (const auto &[name, child] : module.children) + self(self, child); + if (!module.free_funcs.empty()) + { + std::string out = "package " + module.package + ";\n\n"; + out += "/** The free functions of this namespace. Generated by mrbind, do not edit. */\n"; + out += "@java.lang.SuppressWarnings({\"restricted\", \"cast\"})\npublic final class Functions\n{\n private Functions() {}\n\n"; + std::string body = module.free_funcs; + while (body.ends_with("\n\n")) + body.pop_back(); + out += Indent(body, 1); + out += "}\n"; + output_files[module.dir + "/Functions.java"] = out; + } + }; + WriteFunctions(WriteFunctions, root); + } +} diff --git a/src/generators/java/generator.h b/src/generators/java/generator.h new file mode 100644 index 00000000..a4dcec02 --- /dev/null +++ b/src/generators/java/generator.h @@ -0,0 +1,199 @@ +#pragma once + +#include "generators/c_interop/c_output_desc.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace mrbind::Java +{ + // Generates Java sources from the C bindings description JSON. + // The sources call the C bindings through the foreign function API (`java.lang.foreign`, Java 22+), so there's no JNI glue to compile. + // Two layers: `.ffi` holds one downcall `MethodHandle` per C function, mirroring the C file hierarchy, + // and the classes in the packages named after the C++ namespaces wrap them (opaque classes as `CppObject`s, enums as newtypes, exposed structs as views over native memory). + // Functions that the safe layer doesn't understand still get wrappers, with raw `MemorySegment`s and primitives. + struct Generator + { + // Input: [ + + CInterop::OutputDesc c_desc; + + // Library names to load. The key is the file group (see `--split-library` in the C generator), empty is the default group. + std::unordered_map imported_lib_names; + + // The base Java package, e.g. `com.example.mylib`. The namespace packages and the `ffi` package are nested in it. + std::string base_package; + + // The C++ namespace (as parts) to put the entities of the global namespace into, including the `std::` types. + // Without this, those end up directly in the base package. + std::vector forced_namespace; + + // ] + + // Output: relative paths to file contents. + std::map output_files; + + void Generate(); + + // Statistics for the final report. + std::size_t num_funcs_total = 0; + std::size_t num_funcs_skipped = 0; // No downcall handle at all, because of a C type we can't spell in Java. + std::size_t num_funcs_raw = 0; // Wrapped, but with raw C types. + std::vector skipped_funcs; + + private: + // A C++ namespace as a Java package. + struct Module + { + std::string package; // Fully qualified, e.g. `com.example.mylib.mr.foo`. + std::string dir; // Relative directory, e.g. `com/example/mylib/mr/foo`. + std::map children; + std::set used_names; // Class names. + std::string free_funcs; // The body of the `Functions` class. + }; + Module root; + + // A generated C file as a class in the `ffi` package, holding the downcall handles. + struct FileClass + { + std::string relative_name; // As in the C bindings, e.g. `MR/1`. + std::string group; // The `--split-library` group. + std::vector idents; // The path components as Java identifiers. The last one is the class name. + std::string java_path; // Fully qualified class name. + std::vector handles; // One `static final MethodHandle` declaration per function. + }; + std::map file_classes; + [[nodiscard]] FileClass &GetFileClass(const CInterop::OutputFile &file); + + // The handles of a file class are split into nested classes of this many handles each, to keep the static initializers small. + static constexpr std::size_t handles_per_chunk = 200; + // Returns the fully qualified name of the holder class of a handle. + [[nodiscard]] static std::string HandleHolder(const FileClass &file, std::size_t index); + + struct TypeInfo + { + const CInterop::TypeKinds::Class *class_desc = nullptr; + const CInterop::TypeKinds::Enum *enum_desc = nullptr; + const CInterop::TypeTraits *traits = nullptr; + std::string cpp_name; + std::string c_name; + std::string java_path; // Fully qualified, e.g. `com.example.mylib.mr.A`. + std::string java_unqual; + Module *module = nullptr; + FileClass *file = nullptr; + bool has_destroy = false; + std::string destroy_handle; // The fully qualified handle of `_Destroy`, if `has_destroy`. + bool copyable = false; + std::string enum_java_type; // For enums: the Java primitive type of the value. + std::string enum_layout; // For enums: the value layout. + std::string enum_size; // For enums: the size in bytes, as an expression. + bool enum_is_c_long = false; // For enums: the underlying type is C `long`, which needs special care. + + [[nodiscard]] bool IsExposedStruct() const {return class_desc && class_desc->kind == CInterop::ClassKind::exposed_struct;} + [[nodiscard]] bool IsEnum() const {return enum_desc != nullptr;} + }; + std::map types_by_cpp_name; + std::unordered_map types_by_c_name; + std::set platform_dependent_structs; // By C++ name. + std::unordered_map handle_paths; // C function name -> the fully qualified downcall handle. + + std::unordered_map cached_parsed_types; + [[nodiscard]] const cppdecl::Type &ParseTypeOrThrow(const std::string &str); + + [[nodiscard]] Module &GetModuleForNamespace(const std::vector &ns_parts); + [[nodiscard]] std::string UniqueName(std::set &used, std::string name); + + void CollectTypes(); + void EmitRuntime(); + void EmitHandles(); + void EmitEnums(); + void EmitClasses(); + void EmitFreeFunctions(); + void EmitFiles(); + + // How a C type is spelled on the Java side. + struct JavaType + { + std::string layout; // The `MemoryLayout` expression. Empty for `void`. + std::string java; // The Java type of the downcall handle: a primitive, `MemorySegment`, or `void`. + std::string size_expr; // The size in bytes, as a Java expression. + bool is_pointer = false; + bool is_c_long = false; // C `long`, whose layout is only known at runtime. + bool platform_dependent = false; // The size depends on the platform (pointers, `size_t`, `long`). + const TypeInfo *type_info = nullptr; // Set for enums and exposed structs. + std::vector array_dims; // Non-empty for arrays, which only appear in exposed structs. + std::shared_ptr array_elem; // For arrays, the innermost element type. + }; + // Maps a C type (or a C++ type for exposed struct fields) to its Java spelling. Returns null if the type can't be expressed. + [[nodiscard]] std::optional CTypeToJava(const cppdecl::Type &type, std::size_t i = 0); + [[nodiscard]] std::optional CTypeToJava(const std::string &str); + + // The Java type of a parameter or a return value, with the conversions to and from the raw type. + struct ParamStrings + { + bool skip = false; // The fake `this` of static functions and constructors. + bool is_receiver = false; + std::vector> java_params; // Name and type. + std::vector args; // Arguments for the downcall, with the exact static types of the handle. + std::string pre; // Statements before the call. Each ends with a newline. + bool needs_arena = false; // The statements use `__arena`. + std::vector fences; // Objects to keep alive until the call returns. + bool is_raw = false; // Fell back to raw C types. + std::string object_param; // The name of the parameter if it's a single wrapped object, for the owner of returned references. + }; + [[nodiscard]] std::optional MapParam(const CInterop::FuncParam ¶m, const TypeInfo *this_type); + + struct ReturnStrings + { + std::string java_type; + std::string handle_type; // The Java type returned by the handle. + std::string convert; // An expression in terms of `__ret` and `__owner`. + bool returns_struct = false; // The handle takes a `SegmentAllocator` first. + bool is_raw = false; + }; + [[nodiscard]] std::optional MapReturn(const CInterop::FuncReturn &ret); + + // A wrapper that is ready to be emitted, once its name is known. + struct PreparedFunc + { + const CInterop::BasicFuncLike *func = nullptr; + const TypeInfo *this_type = nullptr; + bool is_static = false; // No receiver. + bool is_ctor = false; + std::vector params; + ReturnStrings ret; + std::string signature; // The Java parameter types, to detect overload clashes. + std::string preferred_name; + std::string fallback_name; // Derived from the C name, unique. + bool is_raw = false; + }; + // Returns null if the function has to be skipped entirely. + [[nodiscard]] std::optional PrepareFunc(const CInterop::BasicFuncLike &func, const TypeInfo *this_type, bool is_ctor, std::string preferred_name, std::string fallback_name); + // Resolves the overloads: a function keeps its preferred name if no other function in the scope has the same name and signature. + void ResolveNames(std::vector &funcs, std::set &used_names, std::vector &names); + // Emits one wrapper method or constructor. `indent` is in levels. + void EmitPrepared(std::string &out, const PreparedFunc &func, const std::string &name, int indent); + + [[nodiscard]] std::string MakeDocComment(const CInterop::Comment &comment, int indent, const std::string &extra_line = "") const; + + [[nodiscard]] std::string HandleDecl(const CInterop::BasicFuncLike &func, bool &ok); + + [[nodiscard]] std::string RuntimeClass(std::string_view name) const {return base_package + "." + std::string(name);} + }; + + // Escapes Java keywords and bad identifiers. + [[nodiscard]] std::string JavaIdent(std::string str); + // `foo_bar` -> `fooBar`, `FooBar` -> `fooBar`. + [[nodiscard]] std::string JavaMethodName(std::string_view str); + // `x` -> `X`. + [[nodiscard]] std::string Capitalize(std::string str); + // The Java name of an overloaded operator: `!=` -> `opNotEqual`, `+=` -> `opAddAssign`. + [[nodiscard]] std::string OperatorName(std::string_view token, bool is_post_incr_or_decr); +} diff --git a/src/generators/java/main.cpp b/src/generators/java/main.cpp new file mode 100644 index 00000000..6580a9b8 --- /dev/null +++ b/src/generators/java/main.cpp @@ -0,0 +1,144 @@ +#include "common/command_line_args_as_utf8.h" +#include "common/command_line_parser.h" +#include "common/filesystem.h" +#include "common/set_error_handlers.h" +#include "generators/c_interop/desc_to_and_from_json.h" +#include "generators/java/generator.h" + +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + mrbind::SetErrorHandlers(); + + std::optional input_json_path; + std::optional output_dir_path; + bool clean_output_dir = false; + bool verbose = false; + + mrbind::Java::Generator generator; + + mrbind::CommandLineParser args_parser; + + args_parser.AddFlag("--input-json", { + .arg_names = {"filename.json"}, + .desc = "Path to the input json as produced by `mrbind_gen_c --output-desc-json`.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + input_json_path = args.front(); + }, + }); + args_parser.AddFlag("--output-dir", { + .arg_names = {"dir"}, + .desc = "Output directory path, the root of the Java sources (the package directories are created in it). This directory is created if it doesn't exist. Otherwise it must be already empty, or you must specify `--clean-output-dir`.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + output_dir_path = args.front(); + }, + }); + args_parser.AddFlag("--clean-output-dir", { + .desc = "Destroys the contents of `--output-dir` before generating the new files. If this is not specified, `--output-dir` must be empty.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + (void)args; + clean_output_dir = true; + }, + }); + args_parser.AddFlag("--package", { + .arg_names = {"name"}, + .desc = "Mandatory. The base Java package, e.g. `com.example.mylib`. The runtime classes go directly into it, the C++ namespaces become its subpackages, and the raw downcall handles go to its `ffi` subpackage.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + generator.base_package = args.front(); + }, + }); + args_parser.AddFlag("--imported-lib-name", { + .arg_names = {"name"}, + .desc = "Mandatory. The name of the shared library compiled from the generated C bindings, without the `lib` prefix and the extension. It's loaded with `System.loadLibrary()`.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + generator.imported_lib_names.insert_or_assign("", args.front()); + }, + }); + args_parser.AddFlag("--imported-split-lib-name", { + .allow_repeat = true, + .arg_names = {"macro_prefix", "name"}, + .desc = "Optional, can be repeated. Replaces the value of `--imported-lib-name` for some of the generated files. This should be used with the `--split-library ...' flag of the C generator. Pass the same macro prefixes that you passed to the C generator, each with the name of the library those files are compiled into.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + generator.imported_lib_names.insert_or_assign(std::string(args[0]), args[1]); + }, + }); + args_parser.AddFlag("--force-namespace", { + .arg_names = {"name"}, + .desc = "A C++-style `Foo::Bar` namespace name. The entities of the global namespace (including the `std::` types) are put into the package of this namespace. Without this they go directly to the base package.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + std::string_view str = args.front(); + generator.forced_namespace.clear(); + while (!str.empty()) + { + std::size_t sep = str.find("::"); + std::string_view part = str.substr(0, sep); + if (part.empty()) + throw std::runtime_error("Bad namespace name: `" + std::string(args.front()) + "`."); + generator.forced_namespace.emplace_back(part); + str = sep == std::string_view::npos ? std::string_view{} : str.substr(sep + 2); + } + }, + }); + args_parser.AddFlag("--verbose", { + .desc = "List the functions that got skipped because their C types can't be spelled in Java.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + (void)args; + verbose = true; + }, + }); + + mrbind::CommandLineArgsAsUtf8 args(argc, argv); + args_parser.Parse(args.argc, args.argv); + + if (!input_json_path) + throw std::runtime_error("`--input-json` is required."); + generator.c_desc = mrbind::CInterop::LoadOutputDescFromFile(input_json_path->c_str()); + + if (!output_dir_path) + throw std::runtime_error("`--output-dir` is required."); + const std::filesystem::path output_dir_fs_path = mrbind::MakePath(*output_dir_path); + mrbind::PrepareOutputDir(output_dir_fs_path, clean_output_dir ? "" : "--clean-output-dir"); + + if (generator.base_package.empty()) + throw std::runtime_error("`--package` is required."); + if (!generator.imported_lib_names.contains("")) + throw std::runtime_error("`--imported-lib-name` is required."); + + generator.Generate(); + + for (const auto &[relative_path, contents] : generator.output_files) + { + std::filesystem::path out_path = output_dir_fs_path / mrbind::MakePath(relative_path); + std::filesystem::create_directories(out_path.parent_path()); + + if (std::filesystem::exists(out_path)) + throw std::runtime_error("Output file already exists: `" + relative_path + "`."); + + std::ofstream out(out_path, std::ios_base::out); + if (!out) + throw std::runtime_error("Failed to open file for writing: `" + mrbind::PathToString(out_path) + "`."); + out << contents; + if (!out) + throw std::runtime_error("Failed to write to file: `" + mrbind::PathToString(out_path) + "`."); + } + + std::fprintf(stderr, "Generated Java bindings: %zu functions, %zu of them with raw C types, %zu skipped.\n", generator.num_funcs_total, generator.num_funcs_raw, generator.num_funcs_skipped); + if (verbose) + { + for (const auto &name : generator.skipped_funcs) + std::fprintf(stderr, " skipped: %s\n", name.c_str()); + } +} diff --git a/test/make_java.sh b/test/make_java.sh new file mode 100644 index 00000000..c87e7398 --- /dev/null +++ b/test/make_java.sh @@ -0,0 +1,47 @@ +# This assumes that `make_c.sh` was already ran. +# Needs a JDK 22 or newer (`javac` and `java` in PATH, or `JAVA_HOME` set). + +set -euxo pipefail +shopt -s nullglob + +JAVA_BIN="${JAVA_HOME:+$JAVA_HOME/bin/}" + +build/mrbind_gen_java \ + --input-json test/output_c/desc.json \ + --output-dir test/output_java/src \ + --clean-output-dir \ + --package mrbind_test \ + --force-namespace MR::CS \ + --imported-lib-name bleh \ + +build/mrbind_gen_java \ + --input-json test/output_c_fixed_typedefs/desc.json \ + --output-dir test/output_java_fixed_typedefs/src \ + --clean-output-dir \ + --package mrbind_test \ + --force-namespace MR::CS \ + --imported-lib-name bleh \ + --imported-split-lib-name MR_A_ bleh_A \ + --imported-split-lib-name MR_B_ bleh_B \ + --imported-split-lib-name MR_AB_ bleh_AB \ + +build/mrbind_gen_java \ + --input-json test/output_c_fixed_typedefs_64_only/desc.json \ + --output-dir test/output_java_fixed_typedefs_64_only/src \ + --clean-output-dir \ + --package mrbind_test \ + --force-namespace MR::CS \ + --imported-lib-name bleh \ + --imported-split-lib-name MR_AB_ bleh_AB \ + +# Compile each output. `javac` reads the list of sources from a file, the command line would be too long otherwise. +for dir in test/output_java test/output_java_fixed_typedefs test/output_java_fixed_typedefs_64_only; do + rm -rf "$dir/classes" + find "$dir/src" -name '*.java' >"$dir/sources.txt" + "${JAVA_BIN}javac" --release 22 -Xlint:all -Werror -d "$dir/classes" "@$dir/sources.txt" +done + +# The test program loads `libbleh.so` (or `bleh.dll` on Windows) at runtime, from `java.library.path`. +rm -rf test/run_java/classes +"${JAVA_BIN}javac" --release 22 -Xlint:all -Werror -d test/run_java/classes -cp test/output_java/classes test/run_java/Main.java +PATH="$PWD/test/output_c:$PATH" "${JAVA_BIN}java" --enable-native-access=ALL-UNNAMED -Djava.library.path=test/output_c -cp "test/output_java/classes:test/run_java/classes" Main diff --git a/test/run_java/Main.java b/test/run_java/Main.java new file mode 100644 index 00000000..6729686e --- /dev/null +++ b/test/run_java/Main.java @@ -0,0 +1,94 @@ +// A smoke test for the generated Java bindings. Needs the C bindings library `bleh` to be loadable, see `make_java.sh`. + +import mrbind_test.CppException; +import mrbind_test.mr.A; +import mrbind_test.mr.cs.std_string; +import mrbind_test.mr.cs.std_vector_int; +import mrbind_test.mr.csharp.E1; +import mrbind_test.mr.csharp.ExposedLayout; + +public class Main +{ + static void check(boolean condition, String what) + { + if (!condition) + throw new AssertionError(what); + } + + public static void main(String[] args) + { + // An opaque class with a `std::string` field. + try (A a = new A()) + { + check(a.x().toString().equals(""), "default x"); + a.setX("hello"); + check(a.x().toString().equals("hello"), "set x"); + A a2 = new A(a); // The copy constructor. + a.x().assignFrom("changed"); + check(a.x().toString().equals("changed"), "assign through the reference"); + check(a2.x().toString().equals("hello"), "the copy is independent"); + check(a.isOwned() && !a.x().isOwned(), "ownership"); + } + + // Free functions, `std::string` parameters become `String`. + mrbind_test.mr.stdstring.Functions.Set("from java"); + mrbind_test.mr.stdstring.Functions.SetWithDefault(null); + std_string s = mrbind_test.mr.stdstring.Functions.Get(); + check(s.toString().equals("Hello!"), "get"); + std_string s2 = new std_string(); + mrbind_test.mr.stdstring.Functions.WriteToRef(s2); + check(s2.toString().equals("Hello!"), "write to ref"); + mrbind_test.mr.stdstring.Functions.WriteToPtr(s2); + + // `std::vector`. + std_vector_int v = new std_vector_int(); + check(v.empty(), "empty"); + v.resize(3); + check(v.size() == 3, "size"); + check(v.at(1) == 0, "at"); + check(v.front() == 0 && v.back() == 0, "front and back"); + v.push_back(7); + check(v.at(3) == 7, "push_back"); + mrbind_test.mr.stdcontainers.Functions.Set(v); + mrbind_test.mr.stdcontainers.Functions.ConstRef(v); + std_vector_int v2 = mrbind_test.mr.stdcontainers.Functions.Get(); + check(v2.empty(), "get"); + std_vector_int v3 = new std_vector_int(v); + check(v3.size() == 4, "copy"); + + // Enums are classes with constants. + check(mrbind_test.mr.csharp.Functions.test_enum(E1.a, null).equals(E1.b), "enum default"); + check(mrbind_test.mr.csharp.Functions.test_enum(E1.a, E1.a).equals(E1.a), "enum"); + check(E1.of(20) == E1.b, "enum of"); + + // Exposed structs are views over native memory with the C++ layout. + ExposedLayout ex = new ExposedLayout(); + ex.setX((short)1); + ex.setY(2); + ex.setZ(3); + ex.setArr(2, 3); + ex.setB(true); + ex.setBa(1, 2, true); + check(ex.x() == 1 && ex.y() == 2 && ex.z() == 3 && ex.arr(2) == 3 && ex.b() && ex.ba(1, 2) && !ex.ba(0, 0), "fields"); + ex.foo(); + ex.bar(); + ExposedLayout.blah(); + ExposedLayout ex2 = ex.copy(); + ex.setX((short)10); + check(ex2.x() == 1, "struct copy"); + + // A C++ exception becomes a `CppException`. + boolean caught = false; + try + { + new std_vector_int().at(100); // `std::vector::at()` throws `std::out_of_range`. + } + catch (CppException e) + { + caught = true; + } + check(caught, "exception"); + + System.out.println("All Java binding tests passed."); + } +} From 607002b4e5aeae66816b3da0b1305096dc9293b7 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 13:10:28 +0300 Subject: [PATCH 02/10] Java: shorten class names longer than 100 characters Each class is a file, and a `std::function` instantiation from MeshLib produced a 190-character name that overflowed the Windows path length limit. Same truncation and hash suffix as the C generator applies to header names. Co-Authored-By: Claude Fable 5.1 --- docs/generating_java.md | 2 ++ src/generators/java/generator.cpp | 20 ++++++++++++++++++-- src/generators/java/generator.h | 4 ++++ src/generators/java/main.cpp | 8 ++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/generating_java.md b/docs/generating_java.md index 90c806e6..ff592127 100644 --- a/docs/generating_java.md +++ b/docs/generating_java.md @@ -41,6 +41,8 @@ Where: * `--force-namespace MyLib` is optional, but you'll usually want it. It puts the entities of the global C++ namespace (which includes the `std::` container instantiations) into the package of this namespace (`com.example.mylib.mylib` here, `Foo::Bar` becomes `foo.bar`). Without it they go directly to the base package, next to the runtime classes. +Class names longer than 100 characters (some `std::function` instantiations) are truncated and suffixed with a hash, since each class is a file and Windows limits the path length. `--max-class-name-length` changes the limit, 0 disables it. + The generator prints a summary at the end: how many functions got wrappers, how many of those use raw C types, and how many were skipped because their C types can't be spelled in Java (`long double` and such). Pass `--verbose` to list the skipped ones. ### Compiling and running diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp index 4cd31c59..b3dda0da 100644 --- a/src/generators/java/generator.cpp +++ b/src/generators/java/generator.cpp @@ -1,5 +1,6 @@ #include "generators/java/generator.h" +#include "common/hash.h" #include "common/strings.h" #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include @@ -224,6 +226,20 @@ namespace mrbind::Java return file.java_path + ".H" + std::to_string(index / handles_per_chunk); } + std::string Generator::ShortenClassName(std::string name) const + { + // A Java class is a file, so the name counts towards the path length limit of Windows. Same scheme as the C generator uses for the headers. + if (max_class_name_length != 0 && name.size() > max_class_name_length) + { + auto hash = Hash(std::string_view(name).substr(max_class_name_length)); + name.resize(max_class_name_length); + char buffer[32]; + std::snprintf(buffer, sizeof buffer, "__%x", (unsigned int)hash); + name += buffer; + } + return name; + } + std::string Generator::UniqueName(std::set &used, std::string name) { if (used.insert(name).second) @@ -530,7 +546,7 @@ namespace mrbind::Java if (ns_parts.empty()) ns_parts = forced_namespace; info.module = &GetModuleForNamespace(ns_parts); - info.java_unqual = UniqueName(info.module->used_names, JavaIdent(ident)); + info.java_unqual = UniqueName(info.module->used_names, ShortenClassName(JavaIdent(ident))); } else { @@ -558,7 +574,7 @@ namespace mrbind::Java if (ns_parts.empty()) ns_parts = forced_namespace; info.module = &GetModuleForNamespace(ns_parts); - info.java_unqual = UniqueName(info.module->used_names, JavaIdent(unqual)); + info.java_unqual = UniqueName(info.module->used_names, ShortenClassName(JavaIdent(unqual))); } info.java_path = info.module->package + "." + info.java_unqual; info.file = &GetFileClass(info.class_desc ? info.class_desc->output_file : info.enum_desc->output_file); diff --git a/src/generators/java/generator.h b/src/generators/java/generator.h index a4dcec02..b2fd5593 100644 --- a/src/generators/java/generator.h +++ b/src/generators/java/generator.h @@ -35,6 +35,9 @@ namespace mrbind::Java // Without this, those end up directly in the base package. std::vector forced_namespace; + // Class names longer than this get truncated and suffixed with a hash, since the file names must fit the Windows path length limit. 0 disables this. + std::size_t max_class_name_length = 100; + // ] // Output: relative paths to file contents. @@ -109,6 +112,7 @@ namespace mrbind::Java [[nodiscard]] Module &GetModuleForNamespace(const std::vector &ns_parts); [[nodiscard]] std::string UniqueName(std::set &used, std::string name); + [[nodiscard]] std::string ShortenClassName(std::string name) const; void CollectTypes(); void EmitRuntime(); diff --git a/src/generators/java/main.cpp b/src/generators/java/main.cpp index 6580a9b8..089028cd 100644 --- a/src/generators/java/main.cpp +++ b/src/generators/java/main.cpp @@ -91,6 +91,14 @@ int main(int argc, char **argv) } }, }); + args_parser.AddFlag("--max-class-name-length", { + .arg_names = {"n"}, + .desc = "Shorten the generated class names to this length, plus a hash. Each class is a file, and Windows has a small default path length limit. The default is 100, 0 disables this.", + .func = [&](mrbind::CommandLineParser::ArgSpan args) + { + generator.max_class_name_length = mrbind::CommandLineParser::ParseSizeT(std::string(args.front())); + }, + }); args_parser.AddFlag("--verbose", { .desc = "List the functions that got skipped because their C types can't be spelled in Java.", .func = [&](mrbind::CommandLineParser::ArgSpan args) From 205eddeb879db238c4af24be0ca51df36dda4e80 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 13:24:50 +0300 Subject: [PATCH 03/10] Java: commit the generated test outputs, like the C, C# and Rust ones Generated on Linux by test/make_java.sh, which also compiled them and ran the smoke test there. Co-Authored-By: Claude Fable 5.1 --- .../src/mrbind_test/CppException.java | 9 + .../src/mrbind_test/CppObject.java | 90 + .../src/mrbind_test/CppStruct.java | 22 + test/output_java/src/mrbind_test/Ffi.java | 258 + test/output_java/src/mrbind_test/Native.java | 8 + test/output_java/src/mrbind_test/ffi/A/a.java | 17 + .../src/mrbind_test/ffi/AB_base/ab_base.java | 17 + test/output_java/src/mrbind_test/ffi/B/b.java | 17 + .../src/mrbind_test/ffi/MR/_1.java | 22 + .../ffi/MR/test_abstract_classes.java | 18 + .../ffi/MR/test_adjusting_names.java | 25 + .../mrbind_test/ffi/MR/test_aggregates.java | 126 + .../MR/test_arrays_of_incomplete_types.java | 14 + .../MR/test_arrays_of_incomplete_types_2.java | 14 + .../src/mrbind_test/ffi/MR/test_bases.java | 61 + .../mrbind_test/ffi/MR/test_combined_a_b.java | 14 + .../src/mrbind_test/ffi/MR/test_conv_ops.java | 18 + .../ffi/MR/test_copy_inherited_members.java | 165 + .../src/mrbind_test/ffi/MR/test_csharp.java | 1346 +++ .../ffi/MR/test_custom_preferred_names.java | 22 + .../ffi/MR/test_declaration_order.java | 19 + .../mrbind_test/ffi/MR/test_deprecation.java | 15 + .../MR/test_includes_for_enum_constants.java | 14 + .../test_includes_for_enum_constants_2.java | 17 + .../test_includes_for_enum_constants_3.java | 7 + .../src/mrbind_test/ffi/MR/test_iostream.java | 19 + .../ffi/MR/test_lifetime_inference.java | 39 + .../ffi/MR/test_matching_layout.java | 21 + .../mrbind_test/ffi/MR/test_member_vars.java | 27 + .../ffi/MR/test_mention_blacklists.java | 34 + .../MR/test_nested_class_template_inst.java | 21 + .../mrbind_test/ffi/MR/test_nested_types.java | 28 + ...test_omitting_template_args_and_quals.java | 32 + .../ffi/MR/test_overloaded_operators.java | 117 + .../mrbind_test/ffi/MR/test_overloads.java | 27 + .../src/mrbind_test/ffi/MR/test_phmap.java | 25 + .../mrbind_test/ffi/MR/test_simple_types.java | 73 + .../ffi/MR/test_size_t_ptrdiff_t.java | 24 + .../ffi/MR/test_static_memberr.java | 21 + .../ffi/MR/test_std_containers.java | 65 + .../mrbind_test/ffi/MR/test_std_expected.java | 24 + .../ffi/MR/test_std_filesystem.java | 18 + .../mrbind_test/ffi/MR/test_std_function.java | 29 + .../mrbind_test/ffi/MR/test_std_optional.java | 49 + .../ffi/MR/test_std_shared_ptr.java | 57 + .../mrbind_test/ffi/MR/test_std_string.java | 21 + .../ffi/MR/test_std_string_view.java | 21 + .../ffi/MR/test_std_tuple_like.java | 25 + .../ffi/MR/test_std_unique_ptr.java | 50 + .../src/mrbind_test/ffi/MR/test_tags.java | 18 + .../ffi/MR/test_typedefs_in_templates.java | 29 + .../mrbind_test/ffi/MR/test_using_decls.java | 40 + .../src/mrbind_test/ffi/MR/test_variant.java | 17 + .../src/mrbind_test/ffi/iostream.java | 17 + .../ffi/phmap_btree_map_int_float.java | 53 + .../ffi/phmap_btree_multimap_int_float.java | 52 + .../ffi/phmap_btree_multiset_int.java | 37 + .../mrbind_test/ffi/phmap_btree_set_int.java | 37 + .../ffi/phmap_flat_hash_map_int_float.java | 51 + .../ffi/phmap_flat_hash_set_int.java | 36 + .../ffi/phmap_node_hash_map_int_float.java | 51 + .../ffi/phmap_node_hash_set_int.java | 36 + ...hmap_parallel_flat_hash_map_int_float.java | 51 + .../ffi/phmap_parallel_flat_hash_set_int.java | 36 + ...hmap_parallel_node_hash_map_int_float.java | 51 + .../ffi/phmap_parallel_node_hash_set_int.java | 36 + .../ffi/std_array_MR_StdContainers_A_42.java | 25 + ...ray_MR_StdContainers_NonAssignable_42.java | 23 + .../src/mrbind_test/ffi/std_array_int_43.java | 7 + .../ffi/std_array_int_array_4_array_3_5.java | 7 + ..._deque_MR_StdContainers_NonAssignable.java | 62 + .../src/mrbind_test/ffi/std_deque_int.java | 71 + .../ffi/std_expected_MR_CSharp_E1_float.java | 22 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 22 + ...xpected_MR_CSharp_ExposedLayout_float.java | 22 + ...d_expected_MR_CSharp_NonTrivial_float.java | 22 + .../ffi/std_expected_MR_CSharp_SA_float.java | 22 + .../std_expected_MR_CSharp_Trivial_float.java | 22 + .../ffi/std_expected_int_float.java | 22 + .../ffi/std_expected_int_std_string.java | 22 + .../ffi/std_expected_void_float.java | 21 + .../mrbind_test/ffi/std_filesystem_path.java | 20 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 20 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 20 + .../ffi/std_function_MR_StdFunction_A.java | 20 + ...dFunction_E_from_int_MR_StdFunction_E.java | 20 + .../src/mrbind_test/ffi/std_function_int.java | 20 + .../ffi/std_function_int_from_int_int.java | 20 + .../ffi/std_function_int_from_std_string.java | 20 + ...n_int_ref_from_int_ref_int_rvalue_ref.java | 20 + .../ffi/std_function_int_rvalue_ref.java | 20 + ...td_function_std_string_from_int_float.java | 20 + .../std_function_std_string_from_int_int.java | 20 + .../mrbind_test/ffi/std_function_void.java | 20 + ...d_function_void_from_MR_StdFunction_A.java | 20 + .../ffi/std_function_void_from_int_int.java | 20 + .../std_function_void_from_std_string.java | 20 + ...d_list_MR_StdContainers_NonAssignable.java | 59 + .../src/mrbind_test/ffi/std_list_int.java | 61 + ..._MR_StdContainers_NonAssignable_float.java | 53 + .../mrbind_test/ffi/std_map_int_float.java | 53 + ..._MR_StdContainers_NonAssignable_float.java | 52 + .../ffi/std_multimap_int_float.java | 52 + ...ltiset_MR_StdContainers_NonAssignable.java | 35 + .../mrbind_test/ffi/std_multiset_float.java | 37 + .../src/mrbind_test/ffi/std_multiset_int.java | 37 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 22 + .../std_optional_MR_CSharp_NonTrivial.java | 22 + .../ffi/std_optional_MR_CSharp_SA.java | 22 + .../ffi/std_optional_MR_CSharp_Trivial.java | 22 + .../ffi/std_optional_MR_StdOptional_A.java | 22 + .../ffi/std_optional_MR_StdOptional_B.java | 22 + .../ffi/std_optional_MR_StdOptional_E.java | 22 + .../src/mrbind_test/ffi/std_optional_int.java | 22 + .../ffi/std_optional_std_string.java | 22 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 21 + ..._MR_StdContainers_NonAssignable_float.java | 19 + .../ffi/std_pair_const_int_float.java | 20 + ...td_pair_const_int_ref_const_float_ref.java | 18 + ...int_rvalue_ref_const_float_rvalue_ref.java | 18 + .../mrbind_test/ffi/std_pair_int_float.java | 22 + .../ffi/std_pair_int_ref_float_ref.java | 17 + ..._pair_int_rvalue_ref_float_rvalue_ref.java | 18 + .../ffi/std_pair_int_std_string.java | 22 + ...td_set_MR_StdContainers_NonAssignable.java | 35 + .../src/mrbind_test/ffi/std_set_float.java | 37 + .../src/mrbind_test/ffi/std_set_int.java | 37 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SA.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SE.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SG.java | 29 + .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 30 + .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 30 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 31 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 29 + .../std_shared_ptr_const_MR_CSharp_SA.java | 32 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 32 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 33 + ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 31 + .../ffi/std_shared_ptr_const_int.java | 32 + .../ffi/std_shared_ptr_const_int_array.java | 33 + .../std_shared_ptr_const_int_array_42.java | 31 + .../ffi/std_shared_ptr_const_void.java | 27 + .../mrbind_test/ffi/std_shared_ptr_int.java | 30 + .../ffi/std_shared_ptr_int_array.java | 31 + .../ffi/std_shared_ptr_int_array_42.java | 29 + .../mrbind_test/ffi/std_shared_ptr_void.java | 25 + .../src/mrbind_test/ffi/std_string.java | 24 + .../src/mrbind_test/ffi/std_string_view.java | 22 + .../src/mrbind_test/ffi/std_tuple.java | 17 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 20 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 17 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 18 + ...st_float_ref_int_rvalue_ref_flo__22dd.java | 25 + ...tring_ref_const_std_string_rvalue_ref.java | 20 + .../ffi/std_tuple_const_int_std_string.java | 20 + .../ffi/std_tuple_float_double_int_int.java | 26 + .../src/mrbind_test/ffi/std_tuple_int.java | 20 + .../mrbind_test/ffi/std_tuple_int_float.java | 22 + ..._std_string_ref_std_string_rvalue_ref.java | 19 + .../ffi/std_tuple_int_std_string.java | 22 + .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 21 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 22 + .../mrbind_test/ffi/std_unique_ptr_int.java | 21 + .../ffi/std_unique_ptr_int_array.java | 22 + ..._MR_StdContainers_NonAssignable_float.java | 51 + .../ffi/std_unordered_map_int_float.java | 51 + ..._MR_StdContainers_NonAssignable_float.java | 50 + .../ffi/std_unordered_multimap_int_float.java | 50 + ...ltiset_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_multiset_int.java | 36 + ...ed_set_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_set_int.java | 36 + .../ffi/std_variant_int_float.java | 26 + .../ffi/std_variant_int_float_float.java | 30 + .../ffi/std_variant_int_float_std_string.java | 30 + .../std_variant_std_monostate_int_float.java | 29 + ...variant_std_monostate_int_float_float.java | 33 + .../src/mrbind_test/ffi/std_vector_MR_A.java | 70 + .../ffi/std_vector_MR_CSharp_A_ptr.java | 70 + .../std_vector_MR_CSharp_ExposedLayout.java | 74 + .../ffi/std_vector_MR_SeparateA.java | 69 + .../ffi/std_vector_MR_SeparateB.java | 69 + ...vector_MR_StdContainers_NonAssignable.java | 63 + ...StdContainers_NonDefaultConstructible.java | 69 + .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 70 + .../src/mrbind_test/ffi/std_vector_int.java | 74 + .../src/mrbind_test/ffi/std_vector_long.java | 74 + ...td_vector_std_expected_int_std_string.java | 70 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 69 + .../ffi/std_vector_unsigned_long.java | 74 + test/output_java/src/mrbind_test/mr/A.java | 152 + .../src/mrbind_test/mr/CommonBaseAB.java | 85 + .../src/mrbind_test/mr/Functions.java | 126 + .../src/mrbind_test/mr/SeparateA.java | 81 + .../src/mrbind_test/mr/SeparateB.java | 81 + .../src/mrbind_test/mr/abstractclasses/A.java | 35 + .../src/mrbind_test/mr/abstractclasses/B.java | 50 + .../src/mrbind_test/mr/abstractclasses/C.java | 50 + .../src/mrbind_test/mr/adjustingnames/A.java | 209 + .../mr/adjustingnames/Functions.java | 46 + .../src/mrbind_test/mr/aggregates/A.java | 223 + .../src/mrbind_test/mr/aggregates/B.java | 105 + .../src/mrbind_test/mr/aggregates/C.java | 481 ++ .../src/mrbind_test/mr/aggregates/D.java | 524 ++ .../src/mrbind_test/mr/aggregates/E.java | 572 ++ .../aggregates/NonDefaultConstructible.java | 80 + .../src/mrbind_test/mr/bases/A.java | 117 + .../src/mrbind_test/mr/bases/B.java | 113 + .../src/mrbind_test/mr/bases/B2.java | 109 + .../src/mrbind_test/mr/bases/C.java | 110 + .../src/mrbind_test/mr/bases/D.java | 110 + .../src/mrbind_test/mr/bases/D2.java | 109 + .../src/mrbind_test/mr/bases/D3.java | 109 + .../src/mrbind_test/mr/bases/E.java | 111 + .../src/mrbind_test/mr/bases/F.java | 112 + .../src/mrbind_test/mr/bases/G.java | 109 + .../src/mrbind_test/mr/bases/H.java | 111 + .../src/mrbind_test/mr/bases/I.java | 110 + .../src/mrbind_test/mr/convops/A.java | 127 + .../mr/copyinheritedmembers/A.java | 287 + .../mr/copyinheritedmembers/B.java | 277 + .../mr/copyinheritedmembers/C.java | 108 + .../mr/copyinheritedmembers/D.java | 253 + .../mr/copyinheritedmembers/E.java | 110 + .../mr/copyinheritedmembers/F.java | 110 + .../mr/copyinheritedmembers/G.java | 255 + .../mr/copyinheritedmembers/H.java | 251 + .../mr/copyinheritedmembers/I.java | 251 + .../mr/copyinheritedmembers/J.java | 257 + .../mr/copyinheritedmembers/K.java | 110 + .../mr/copyinheritedmembers/L.java | 110 + .../mr/copyinheritedmembers/M.java | 257 + .../mr/copyinheritedmembers/N.java | 256 + .../mr/copyinheritedmembers/O.java | 255 + .../src/mrbind_test/mr/cs/Functions.java | 2680 ++++++ .../cs/std_array_MR_StdContainers_A_42.java | 296 + ...ray_MR_StdContainers_NonAssignable_42.java | 243 + .../mrbind_test/mr/cs/std_array_int_43.java | 30 + .../cs/std_array_int_array_4_array_3_5.java | 30 + ..._deque_MR_StdContainers_NonAssignable.java | 674 ++ ...ntainers_NonAssignable_const_iterator.java | 221 + ..._StdContainers_NonAssignable_iterator.java | 193 + .../src/mrbind_test/mr/cs/std_deque_int.java | 868 ++ .../mr/cs/std_deque_int_const_iterator.java | 220 + .../mr/cs/std_deque_int_iterator.java | 192 + .../cs/std_expected_MR_CSharp_E1_float.java | 221 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 223 + ...xpected_MR_CSharp_ExposedLayout_float.java | 223 + ...d_expected_MR_CSharp_NonTrivial_float.java | 223 + .../cs/std_expected_MR_CSharp_SA_float.java | 223 + .../std_expected_MR_CSharp_Trivial_float.java | 223 + .../mr/cs/std_expected_int_float.java | 221 + .../mr/cs/std_expected_int_std_string.java | 223 + .../mr/cs/std_expected_void_float.java | 196 + .../mr/cs/std_filesystem_path.java | 173 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 170 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 171 + .../mr/cs/std_function_MR_StdFunction_A.java | 170 + ...dFunction_E_from_int_MR_StdFunction_E.java | 170 + .../mrbind_test/mr/cs/std_function_int.java | 170 + .../mr/cs/std_function_int_from_int_int.java | 170 + .../cs/std_function_int_from_std_string.java | 171 + ...n_int_ref_from_int_ref_int_rvalue_ref.java | 170 + .../mr/cs/std_function_int_rvalue_ref.java | 170 + ...td_function_std_string_from_int_float.java | 170 + .../std_function_std_string_from_int_int.java | 170 + .../mrbind_test/mr/cs/std_function_void.java | 169 + ...d_function_void_from_MR_StdFunction_A.java | 170 + .../mr/cs/std_function_void_from_int_int.java | 169 + .../cs/std_function_void_from_std_string.java | 170 + .../src/mrbind_test/mr/cs/std_istream.java | 13 + ...d_list_MR_StdContainers_NonAssignable.java | 695 ++ ...ntainers_NonAssignable_const_iterator.java | 199 + ..._StdContainers_NonAssignable_iterator.java | 171 + .../src/mrbind_test/mr/cs/std_list_int.java | 728 ++ .../mr/cs/std_list_int_const_iterator.java | 198 + .../mr/cs/std_list_int_iterator.java | 170 + ..._MR_StdContainers_NonAssignable_float.java | 461 + ...rs_NonAssignable_float_const_iterator.java | 248 + ...ntainers_NonAssignable_float_iterator.java | 220 + .../mrbind_test/mr/cs/std_map_int_float.java | 457 + .../cs/std_map_int_float_const_iterator.java | 247 + .../mr/cs/std_map_int_float_iterator.java | 219 + ..._MR_StdContainers_NonAssignable_float.java | 436 + ...rs_NonAssignable_float_const_iterator.java | 248 + ...ntainers_NonAssignable_float_iterator.java | 220 + .../mr/cs/std_multimap_int_float.java | 433 + ...std_multimap_int_float_const_iterator.java | 247 + .../cs/std_multimap_int_float_iterator.java | 219 + ...ltiset_MR_StdContainers_NonAssignable.java | 339 + ...ntainers_NonAssignable_const_iterator.java | 171 + .../mrbind_test/mr/cs/std_multiset_float.java | 381 + .../cs/std_multiset_float_const_iterator.java | 170 + .../mrbind_test/mr/cs/std_multiset_int.java | 381 + .../cs/std_multiset_int_const_iterator.java | 170 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 226 + .../cs/std_optional_MR_CSharp_NonTrivial.java | 226 + .../mr/cs/std_optional_MR_CSharp_SA.java | 226 + .../mr/cs/std_optional_MR_CSharp_Trivial.java | 226 + .../mr/cs/std_optional_MR_StdOptional_A.java | 226 + .../mr/cs/std_optional_MR_StdOptional_B.java | 226 + .../mr/cs/std_optional_MR_StdOptional_E.java | 219 + .../mrbind_test/mr/cs/std_optional_int.java | 219 + .../mr/cs/std_optional_std_string.java | 221 + .../src/mrbind_test/mr/cs/std_ostream.java | 13 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 209 + ..._MR_StdContainers_NonAssignable_float.java | 151 + .../mr/cs/std_pair_const_int_float.java | 174 + ...td_pair_const_int_ref_const_float_ref.java | 128 + ...int_rvalue_ref_const_float_rvalue_ref.java | 128 + .../mrbind_test/mr/cs/std_pair_int_float.java | 222 + .../mr/cs/std_pair_int_ref_float_ref.java | 99 + ..._pair_int_rvalue_ref_float_rvalue_ref.java | 128 + .../mr/cs/std_pair_int_std_string.java | 226 + ...td_set_MR_StdContainers_NonAssignable.java | 339 + ...ntainers_NonAssignable_const_iterator.java | 171 + .../src/mrbind_test/mr/cs/std_set_float.java | 381 + .../mr/cs/std_set_float_const_iterator.java | 170 + .../src/mrbind_test/mr/cs/std_set_int.java | 381 + .../mr/cs/std_set_int_const_iterator.java | 170 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 418 + .../mr/cs/std_shared_ptr_MR_CSharp_SA.java | 413 + .../mr/cs/std_shared_ptr_MR_CSharp_SE.java | 413 + .../mr/cs/std_shared_ptr_MR_CSharp_SG.java | 389 + .../mr/cs/std_shared_ptr_MR_CommonBaseAB.java | 413 + .../cs/std_shared_ptr_MR_StdSharedPtr_A.java | 413 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 439 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 389 + .../cs/std_shared_ptr_const_MR_CSharp_SA.java | 469 ++ ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 469 ++ ...red_ptr_const_MR_StdSharedPtr_A_array.java | 495 ++ ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 445 + .../mr/cs/std_shared_ptr_const_int.java | 456 + .../mr/cs/std_shared_ptr_const_int_array.java | 491 ++ .../cs/std_shared_ptr_const_int_array_42.java | 442 + .../mr/cs/std_shared_ptr_const_void.java | 350 + .../mrbind_test/mr/cs/std_shared_ptr_int.java | 405 + .../mr/cs/std_shared_ptr_int_array.java | 430 + .../mr/cs/std_shared_ptr_int_array_42.java | 381 + .../mr/cs/std_shared_ptr_void.java | 299 + .../src/mrbind_test/mr/cs/std_string.java | 286 + .../mrbind_test/mr/cs/std_string_view.java | 223 + .../src/mrbind_test/mr/cs/std_tuple.java | 102 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 184 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 106 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 135 + ...at_ref_int_rvalue_ref_float__e0da444a.java | 297 + ...tring_ref_const_std_string_rvalue_ref.java | 182 + .../mr/cs/std_tuple_const_int_std_string.java | 178 + .../mr/cs/std_tuple_float_double_int_int.java | 318 + .../src/mrbind_test/mr/cs/std_tuple_int.java | 174 + .../mr/cs/std_tuple_int_float.java | 222 + ..._std_string_ref_std_string_rvalue_ref.java | 156 + .../mr/cs/std_tuple_int_std_string.java | 226 + .../cs/std_unique_ptr_MR_StdUniquePtr_A.java | 198 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 224 + .../mrbind_test/mr/cs/std_unique_ptr_int.java | 196 + .../mr/cs/std_unique_ptr_int_array.java | 221 + ..._MR_StdContainers_NonAssignable_float.java | 461 + ...rs_NonAssignable_float_const_iterator.java | 226 + ...ntainers_NonAssignable_float_iterator.java | 198 + .../mr/cs/std_unordered_map_int_float.java | 457 + ...nordered_map_int_float_const_iterator.java | 225 + .../std_unordered_map_int_float_iterator.java | 197 + ..._MR_StdContainers_NonAssignable_float.java | 436 + ...rs_NonAssignable_float_const_iterator.java | 226 + ...ntainers_NonAssignable_float_iterator.java | 198 + .../cs/std_unordered_multimap_int_float.java | 433 + ...red_multimap_int_float_const_iterator.java | 225 + ...unordered_multimap_int_float_iterator.java | 197 + ...ltiset_MR_StdContainers_NonAssignable.java | 315 + ...ntainers_NonAssignable_const_iterator.java | 149 + .../mr/cs/std_unordered_multiset_int.java | 381 + ...unordered_multiset_int_const_iterator.java | 148 + ...ed_set_MR_StdContainers_NonAssignable.java | 315 + ...ntainers_NonAssignable_const_iterator.java | 149 + .../mr/cs/std_unordered_set_int.java | 381 + .../std_unordered_set_int_const_iterator.java | 148 + .../mr/cs/std_variant_int_float.java | 313 + .../mr/cs/std_variant_int_float_float.java | 397 + .../cs/std_variant_int_float_std_string.java | 413 + .../std_variant_std_monostate_int_float.java | 375 + ...variant_std_monostate_int_float_float.java | 459 + .../mrbind_test/mr/cs/std_vector_MR_A.java | 860 ++ .../mr/cs/std_vector_MR_A_const_iterator.java | 221 + .../mr/cs/std_vector_MR_A_iterator.java | 193 + .../mr/cs/std_vector_MR_CSharp_A_ptr.java | 854 ++ ...vector_MR_CSharp_A_ptr_const_iterator.java | 220 + .../std_vector_MR_CSharp_A_ptr_iterator.java | 192 + .../std_vector_MR_CSharp_ExposedLayout.java | 959 +++ ...R_CSharp_ExposedLayout_const_iterator.java | 221 + ...ctor_MR_CSharp_ExposedLayout_iterator.java | 193 + .../mr/cs/std_vector_MR_SeparateA.java | 838 ++ ...td_vector_MR_SeparateA_const_iterator.java | 221 + .../cs/std_vector_MR_SeparateA_iterator.java | 193 + .../mr/cs/std_vector_MR_SeparateB.java | 838 ++ ...td_vector_MR_SeparateB_const_iterator.java | 221 + .../cs/std_vector_MR_SeparateB_iterator.java | 193 + ...vector_MR_StdContainers_NonAssignable.java | 695 ++ ...ntainers_NonAssignable_const_iterator.java | 221 + ..._StdContainers_NonAssignable_iterator.java | 193 + ...StdContainers_NonDefaultConstructible.java | 838 ++ ...onDefaultConstructible_const_iterator.java | 221 + ...ners_NonDefaultConstructible_iterator.java | 193 + .../cs/std_vector_const_MR_CSharp_A_ptr.java | 854 ++ ..._const_MR_CSharp_A_ptr_const_iterator.java | 220 + ...vector_const_MR_CSharp_A_ptr_iterator.java | 192 + .../src/mrbind_test/mr/cs/std_vector_int.java | 939 +++ .../mr/cs/std_vector_int_const_iterator.java | 220 + .../mr/cs/std_vector_int_iterator.java | 192 + .../mrbind_test/mr/cs/std_vector_long.java | 939 +++ .../mr/cs/std_vector_long_const_iterator.java | 220 + .../mr/cs/std_vector_long_iterator.java | 192 + ...td_vector_std_expected_int_std_string.java | 860 ++ ...xpected_int_std_string_const_iterator.java | 221 + ..._std_expected_int_std_string_iterator.java | 193 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 838 ++ ...SeparateA_MR_SeparateB_const_iterator.java | 221 + ...ir_MR_SeparateA_MR_SeparateB_iterator.java | 193 + .../mr/cs/std_vector_unsigned_long.java | 943 +++ ...d_vector_unsigned_long_const_iterator.java | 220 + .../cs/std_vector_unsigned_long_iterator.java | 192 + .../src/mrbind_test/mr/csharp/A.java | 259 + .../mr/csharp/AmbiguousTemplates.java | 260 + .../mrbind_test/mr/csharp/ArrayMembers.java | 466 ++ .../src/mrbind_test/mr/csharp/B.java | 278 + .../src/mrbind_test/mr/csharp/C.java | 254 + .../src/mrbind_test/mr/csharp/CallOp.java | 151 + .../mr/csharp/ClassMemberPointersBool.java | 326 + .../mr/csharp/ClassMemberPointersClass.java | 348 + .../mr/csharp/ClassMemberPointersExposed.java | 347 + .../mr/csharp/ClassMemberPointersUshort.java | 326 + .../mr/csharp/ConstNonconstConflicts.java | 256 + .../src/mrbind_test/mr/csharp/ConvCtor.java | 226 + .../mr/csharp/ConvCtorCopyButNoMove.java | 107 + .../mr/csharp/ConvCtorExposed.java | 55 + .../mr/csharp/ConvCtorNonTrivial.java | 129 + .../csharp/ConvCtorNonTrivialRestricted.java | 107 + .../mr/csharp/ConvCtorTrivial.java | 129 + .../mr/csharp/ConvCtorWithDefArg.java | 105 + .../src/mrbind_test/mr/csharp/ConvOp.java | 151 + .../mrbind_test/mr/csharp/ConvOpToRef.java | 177 + .../src/mrbind_test/mr/csharp/D.java | 152 + .../src/mrbind_test/mr/csharp/E.java | 153 + .../src/mrbind_test/mr/csharp/E1.java | 45 + .../src/mrbind_test/mr/csharp/E2.java | 34 + .../src/mrbind_test/mr/csharp/EqualityA.java | 175 + .../src/mrbind_test/mr/csharp/EqualityB.java | 175 + .../src/mrbind_test/mr/csharp/EqualityC.java | 172 + .../src/mrbind_test/mr/csharp/EqualityD.java | 128 + .../src/mrbind_test/mr/csharp/EqualityE.java | 129 + .../mrbind_test/mr/csharp/ExposedLayout.java | 282 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 85 + .../mrbind_test/mr/csharp/ExposedLayoutC.java | 31 + .../mr/csharp/ExposedLayoutSh.java | 305 + .../src/mrbind_test/mr/csharp/F.java | 344 + .../src/mrbind_test/mr/csharp/Functions.java | 7433 +++++++++++++++++ .../src/mrbind_test/mr/csharp/G.java | 346 + .../src/mrbind_test/mr/csharp/IncrDecrA.java | 199 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 198 + .../src/mrbind_test/mr/csharp/IncrDecrC.java | 200 + .../src/mrbind_test/mr/csharp/IncrDecrD.java | 200 + .../src/mrbind_test/mr/csharp/IncrDecrE.java | 173 + .../src/mrbind_test/mr/csharp/IncrDecrF.java | 173 + .../src/mrbind_test/mr/csharp/IncrDecrG.java | 173 + .../src/mrbind_test/mr/csharp/IncrDecrH.java | 173 + .../src/mrbind_test/mr/csharp/IncrDecrI.java | 105 + .../src/mrbind_test/mr/csharp/IndexerA.java | 196 + .../src/mrbind_test/mr/csharp/IndexerB.java | 252 + .../src/mrbind_test/mr/csharp/IndexerC.java | 150 + .../src/mrbind_test/mr/csharp/IterableA.java | 194 + .../src/mrbind_test/mr/csharp/IterableB.java | 194 + .../src/mrbind_test/mr/csharp/IterableC.java | 242 + .../src/mrbind_test/mr/csharp/IterableD.java | 146 + .../src/mrbind_test/mr/csharp/IterableE.java | 146 + .../src/mrbind_test/mr/csharp/IterableF.java | 146 + .../src/mrbind_test/mr/csharp/IterableG.java | 197 + .../src/mrbind_test/mr/csharp/IterableH.java | 198 + .../src/mrbind_test/mr/csharp/IterableI.java | 197 + .../src/mrbind_test/mr/csharp/IterableJ.java | 198 + .../src/mrbind_test/mr/csharp/IterableK.java | 195 + .../mrbind_test/mr/csharp/IterableK_Iter.java | 243 + .../mr/csharp/IterableK_Sentinel.java | 174 + .../mrbind_test/mr/csharp/IterableL_int.java | 194 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 221 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 256 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 180 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 369 + .../src/mrbind_test/mr/csharp/LifetimesE.java | 232 + .../mrbind_test/mr/csharp/NameConflicts.java | 247 + .../mr/csharp/NameConflictsExposed.java | 56 + .../mr/csharp/NameConflictsExposed_A.java | 30 + .../mr/csharp/NameConflicts_A.java | 104 + .../mr/csharp/NonCopyableClassByValueOps.java | 106 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 102 + .../mr/csharp/NonTrivialClassOps.java | 128 + .../mr/csharp/NonTrivialDerived.java | 104 + .../src/mrbind_test/mr/csharp/Outer.java | 127 + .../mrbind_test/mr/csharp/Outer_Inner.java | 126 + .../mrbind_test/mr/csharp/RelationalA.java | 201 + .../mrbind_test/mr/csharp/RelationalB.java | 201 + .../mrbind_test/mr/csharp/RelationalC.java | 178 + .../mrbind_test/mr/csharp/RelationalD.java | 201 + .../mrbind_test/mr/csharp/RelationalE.java | 201 + .../mrbind_test/mr/csharp/RelationalF.java | 197 + .../src/mrbind_test/mr/csharp/SA.java | 105 + .../src/mrbind_test/mr/csharp/SB.java | 182 + .../src/mrbind_test/mr/csharp/SC.java | 157 + .../src/mrbind_test/mr/csharp/SD.java | 108 + .../src/mrbind_test/mr/csharp/SE.java | 182 + .../src/mrbind_test/mr/csharp/SF.java | 157 + .../src/mrbind_test/mr/csharp/SG.java | 26 + .../mrbind_test/mr/csharp/StaticOpsEnum.java | 27 + .../mrbind_test/mr/csharp/StaticOpsLhsA.java | 105 + .../mrbind_test/mr/csharp/StaticOpsLhsB.java | 105 + .../mrbind_test/mr/csharp/StaticOpsLhsC.java | 79 + .../mrbind_test/mr/csharp/StaticOpsLhsD.java | 79 + .../mrbind_test/mr/csharp/StaticOpsLhsE.java | 106 + .../mrbind_test/mr/csharp/StaticOpsLhsF.java | 106 + .../mrbind_test/mr/csharp/StaticOpsLhsG.java | 105 + .../mrbind_test/mr/csharp/StaticOpsLhsH.java | 106 + .../mr/csharp/StaticOpsMixedLhs.java | 104 + .../mr/csharp/StaticOpsMixedRhs.java | 104 + .../mrbind_test/mr/csharp/StaticOpsRhsA.java | 105 + .../mrbind_test/mr/csharp/StaticOpsRhsB.java | 105 + .../mrbind_test/mr/csharp/StaticOpsRhsC.java | 79 + .../mrbind_test/mr/csharp/StaticOpsRhsD.java | 79 + .../mrbind_test/mr/csharp/StaticOpsRhsE.java | 106 + .../mrbind_test/mr/csharp/StaticOpsRhsF.java | 106 + .../mrbind_test/mr/csharp/StaticOpsRhsG.java | 105 + .../mrbind_test/mr/csharp/StaticOpsRhsH.java | 106 + .../mr/csharp/StringConvFsPath.java | 127 + .../mr/csharp/StringConvString.java | 129 + .../mr/csharp/StringConvStringView.java | 128 + .../mrbind_test/mr/csharp/TestConstness.java | 148 + .../src/mrbind_test/mr/csharp/TestFields.java | 509 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 888 ++ .../src/mrbind_test/mr/csharp/TestOpsB.java | 888 ++ .../src/mrbind_test/mr/csharp/TestOpsC.java | 878 ++ .../mr/csharp/TestStdFunction.java | 497 ++ .../src/mrbind_test/mr/csharp/Trivial.java | 102 + .../mrbind_test/mr/csharp/TrivialDerived.java | 104 + .../mrbind_test/mr/customprefnames/Af.java | 104 + .../mrbind_test/mr/customprefnames/Ai.java | 104 + .../mr/customprefnames/Functions.java | 26 + .../src/mrbind_test/mr/declorder/A.java | 77 + .../src/mrbind_test/mr/declorder/A_B.java | 76 + .../src/mrbind_test/mr/declorder/A_E.java | 25 + .../src/mrbind_test/mr/declorder/C_false.java | 53 + .../src/mrbind_test/mr/declorder/C_true.java | 53 + .../mrbind_test/mr/deprecation/Functions.java | 46 + .../A_MR_IncludesForEnumConstants_E_e1.java | 104 + .../mr/includesforenumconstants/E.java | 28 + .../includesforenumconstants/Functions.java | 28 + .../mr/incompletearrayelemtype/E.java | 27 + .../mr/incompletearrayelemtype/Functions.java | 44 + .../src/mrbind_test/mr/iostream/A.java | 104 + .../mrbind_test/mr/iostream/Functions.java | 54 + .../mrbind_test/mr/lifetimeinference/A.java | 220 + .../mrbind_test/mr/lifetimeinference/B.java | 172 + .../mrbind_test/mr/lifetimeinference/C.java | 110 + .../mr/lifetimeinference/Functions.java | 104 + .../src/mrbind_test/mr/matchinglayout/A.java | 96 + .../src/mrbind_test/mr/matchinglayout/B.java | 59 + .../mr/matchinglayout/Functions.java | 95 + .../src/mrbind_test/mr/membervars/A.java | 240 + .../mr/nestedtemplateinst/A_int.java | 104 + .../mr/nestedtemplateinst/A_int_AA_float.java | 105 + .../src/mrbind_test/mr/nestedtypes/A.java | 226 + .../src/mrbind_test/mr/nestedtypes/A_B.java | 104 + .../src/mrbind_test/mr/nestedtypes/A_E.java | 25 + .../mr/omittingtargsandquals/A_float.java | 127 + .../mr/omittingtargsandquals/A_int.java | 150 + .../mr/omittingtargsandquals/Functions.java | 181 + .../src/mrbind_test/mr/overloadedops/A.java | 1147 +++ .../src/mrbind_test/mr/overloadedops/B.java | 105 + .../src/mrbind_test/mr/overloadedops/C.java | 105 + .../src/mrbind_test/mr/overloadedops/D.java | 151 + .../mr/overloadedops/Functions.java | 1095 +++ .../mrbind_test/mr/overloads/Functions.java | 263 + .../src/mrbind_test/mr/phmap/Functions.java | 272 + .../mrbind_test/mr/signaturefilters/A.java | 104 + .../mrbind_test/mr/signaturefilters/Blah.java | 151 + .../mr/signaturefilters/Functions.java | 217 + .../src/mrbind_test/mr/staticfuncs/A.java | 157 + .../src/mrbind_test/mr/stdcontainers/A.java | 105 + .../mr/stdcontainers/Functions.java | 783 ++ .../mr/stdcontainers/NonAssignable.java | 127 + .../NonDefaultConstructible.java | 105 + .../mrbind_test/mr/stdexpected/Functions.java | 241 + .../mr/stdfilesystem/Functions.java | 103 + .../src/mrbind_test/mr/stdfunction/A.java | 177 + .../src/mrbind_test/mr/stdfunction/E.java | 25 + .../mrbind_test/mr/stdfunction/Functions.java | 184 + .../src/mrbind_test/mr/stdoptional/A.java | 170 + .../src/mrbind_test/mr/stdoptional/B.java | 175 + .../src/mrbind_test/mr/stdoptional/E.java | 28 + .../mrbind_test/mr/stdoptional/Functions.java | 412 + .../src/mrbind_test/mr/stdsharedptr/A.java | 105 + .../mr/stdsharedptr/Functions.java | 854 ++ .../mrbind_test/mr/stdstring/Functions.java | 166 + .../mr/stdstringview/Functions.java | 166 + .../mr/stdtuplelike/Functions.java | 243 + .../src/mrbind_test/mr/stduniqueptr/A.java | 105 + .../mr/stduniqueptr/Functions.java | 629 ++ .../mrbind_test/mr/stdvariant/Functions.java | 90 + .../src/mrbind_test/mr/tags/Functions.java | 98 + .../ClassTemplate_unsigned_long.java | 214 + .../ClassTemplate_unsigned_long_Enum.java | 27 + .../src/mrbind_test/mr/testsimpletypes/E.java | 28 + .../mrbind_test/mr/testsimpletypes/E2.java | 30 + .../mrbind_test/mr/testsimpletypes/E3.java | 27 + .../mrbind_test/mr/testsimpletypes/E4.java | 27 + .../mrbind_test/mr/testsimpletypes/E5.java | 27 + .../mr/testsimpletypes/Functions.java | 928 ++ .../mr/testsizet/A_unsigned_long.java | 127 + .../mrbind_test/mr/testsizet/Functions.java | 130 + .../mr/typedefsintemplates/A_int.java | 129 + .../mr/typedefsintemplates/B_int.java | 104 + .../typedefsintemplates/B_int_BB_float.java | 150 + .../mr/typedefsintemplates/Functions.java | 26 + .../src/mrbind_test/mr/usingdecls/A.java | 272 + .../src/mrbind_test/mr/usingdecls/A_E.java | 25 + .../src/mrbind_test/mr/usingdecls/B.java | 247 + .../phmap/phmap_btree_map_int_float.java | 457 + ...ap_btree_map_int_float_const_iterator.java | 247 + .../phmap_btree_map_int_float_iterator.java | 219 + .../phmap/phmap_btree_multimap_int_float.java | 433 + ...ree_multimap_int_float_const_iterator.java | 247 + ...map_btree_multimap_int_float_iterator.java | 219 + .../phmap/phmap_btree_multiset_int.java | 381 + ...map_btree_multiset_int_const_iterator.java | 170 + .../phmap/phmap_btree_set_int.java | 381 + .../phmap_btree_set_int_const_iterator.java | 170 + .../phmap/phmap_flat_hash_map_int_float.java | 457 + ...lat_hash_map_int_float_const_iterator.java | 225 + ...hmap_flat_hash_map_int_float_iterator.java | 197 + .../phmap/phmap_flat_hash_set_int.java | 381 + ...hmap_flat_hash_set_int_const_iterator.java | 148 + .../phmap/phmap_node_hash_map_int_float.java | 457 + ...ode_hash_map_int_float_const_iterator.java | 225 + ...hmap_node_hash_map_int_float_iterator.java | 197 + .../phmap/phmap_node_hash_set_int.java | 381 + ...hmap_node_hash_set_int_const_iterator.java | 148 + ...hmap_parallel_flat_hash_map_int_float.java | 457 + ...lat_hash_map_int_float_const_iterator.java | 225 + ...llel_flat_hash_map_int_float_iterator.java | 197 + .../phmap_parallel_flat_hash_set_int.java | 381 + ...llel_flat_hash_set_int_const_iterator.java | 148 + ...hmap_parallel_node_hash_map_int_float.java | 457 + ...ode_hash_map_int_float_const_iterator.java | 225 + ...llel_node_hash_map_int_float_iterator.java | 197 + .../phmap_parallel_node_hash_set_int.java | 381 + ...llel_node_hash_set_int_const_iterator.java | 148 + .../src/mrbind_test/CppException.java | 9 + .../src/mrbind_test/CppObject.java | 90 + .../src/mrbind_test/CppStruct.java | 22 + .../src/mrbind_test/Ffi.java | 214 + .../src/mrbind_test/Native.java | 8 + .../src/mrbind_test/ffi/A/a.java | 17 + .../ffi/A/std_vector_MR_SeparateA.java | 69 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 21 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 69 + .../src/mrbind_test/ffi/AB_base/ab_base.java | 17 + .../src/mrbind_test/ffi/B/b.java | 17 + .../ffi/B/std_vector_MR_SeparateB.java | 69 + .../src/mrbind_test/ffi/MR/_1.java | 22 + .../ffi/MR/test_abstract_classes.java | 17 + .../ffi/MR/test_adjusting_names.java | 25 + .../mrbind_test/ffi/MR/test_aggregates.java | 125 + .../MR/test_arrays_of_incomplete_types.java | 14 + .../MR/test_arrays_of_incomplete_types_2.java | 14 + .../src/mrbind_test/ffi/MR/test_bases.java | 61 + .../mrbind_test/ffi/MR/test_combined_a_b.java | 14 + .../src/mrbind_test/ffi/MR/test_conv_ops.java | 18 + .../ffi/MR/test_copy_inherited_members.java | 93 + .../src/mrbind_test/ffi/MR/test_csharp.java | 1304 +++ .../ffi/MR/test_custom_preferred_names.java | 22 + .../ffi/MR/test_declaration_order.java | 19 + .../mrbind_test/ffi/MR/test_deprecation.java | 15 + .../MR/test_includes_for_enum_constants.java | 14 + .../test_includes_for_enum_constants_2.java | 17 + .../test_includes_for_enum_constants_3.java | 7 + .../src/mrbind_test/ffi/MR/test_iostream.java | 19 + .../ffi/MR/test_lifetime_inference.java | 39 + .../ffi/MR/test_matching_layout.java | 21 + .../mrbind_test/ffi/MR/test_member_vars.java | 27 + .../ffi/MR/test_mention_blacklists.java | 34 + .../MR/test_nested_class_template_inst.java | 21 + .../mrbind_test/ffi/MR/test_nested_types.java | 28 + ...test_omitting_template_args_and_quals.java | 32 + .../ffi/MR/test_overloaded_operators.java | 117 + .../mrbind_test/ffi/MR/test_overloads.java | 27 + .../src/mrbind_test/ffi/MR/test_phmap.java | 25 + .../mrbind_test/ffi/MR/test_simple_types.java | 72 + .../ffi/MR/test_size_t_ptrdiff_t.java | 24 + .../ffi/MR/test_static_memberr.java | 21 + .../ffi/MR/test_std_containers.java | 65 + .../mrbind_test/ffi/MR/test_std_expected.java | 24 + .../ffi/MR/test_std_filesystem.java | 18 + .../mrbind_test/ffi/MR/test_std_function.java | 29 + .../mrbind_test/ffi/MR/test_std_optional.java | 49 + .../ffi/MR/test_std_shared_ptr.java | 57 + .../mrbind_test/ffi/MR/test_std_string.java | 21 + .../ffi/MR/test_std_string_view.java | 21 + .../ffi/MR/test_std_tuple_like.java | 25 + .../ffi/MR/test_std_unique_ptr.java | 50 + .../src/mrbind_test/ffi/MR/test_tags.java | 18 + .../ffi/MR/test_typedefs_in_templates.java | 29 + .../mrbind_test/ffi/MR/test_using_decls.java | 30 + .../src/mrbind_test/ffi/MR/test_variant.java | 17 + .../ffi/expected_MR_CSharp_E1_float.java | 22 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 22 + ...xpected_MR_CSharp_ExposedLayout_float.java | 22 + .../expected_MR_CSharp_NonTrivial_float.java | 22 + .../ffi/expected_MR_CSharp_SA_float.java | 22 + .../ffi/expected_MR_CSharp_Trivial_float.java | 22 + .../ffi/expected_int32_t_float.java | 22 + .../ffi/expected_int32_t_std_string.java | 22 + .../mrbind_test/ffi/expected_void_float.java | 21 + .../src/mrbind_test/ffi/iostream.java | 17 + .../ffi/phmap_btree_map_int32_t_float.java | 53 + .../phmap_btree_multimap_int32_t_float.java | 52 + .../ffi/phmap_btree_multiset_int32_t.java | 37 + .../ffi/phmap_btree_set_int32_t.java | 37 + .../phmap_flat_hash_map_int32_t_float.java | 51 + .../ffi/phmap_flat_hash_set_int32_t.java | 36 + .../phmap_node_hash_map_int32_t_float.java | 51 + .../ffi/phmap_node_hash_set_int32_t.java | 36 + ..._parallel_flat_hash_map_int32_t_float.java | 51 + .../phmap_parallel_flat_hash_set_int32_t.java | 36 + ..._parallel_node_hash_map_int32_t_float.java | 51 + .../phmap_parallel_node_hash_set_int32_t.java | 36 + .../ffi/std_array_MR_StdContainers_A_42.java | 25 + ...ray_MR_StdContainers_NonAssignable_42.java | 23 + .../mrbind_test/ffi/std_array_int32_t_43.java | 7 + .../std_array_int32_t_array_4_array_3_5.java | 7 + ..._deque_MR_StdContainers_NonAssignable.java | 62 + .../mrbind_test/ffi/std_deque_int32_t.java | 71 + .../mrbind_test/ffi/std_filesystem_path.java | 20 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 20 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 20 + .../ffi/std_function_MR_StdFunction_A.java | 20 + ...ction_E_from_int32_t_MR_StdFunction_E.java | 20 + .../mrbind_test/ffi/std_function_int32_t.java | 20 + ...function_int32_t_from_int32_t_int32_t.java | 20 + .../std_function_int32_t_from_std_string.java | 20 + ...f_from_int32_t_ref_int32_t_rvalue_ref.java | 20 + .../ffi/std_function_int32_t_rvalue_ref.java | 20 + ...unction_std_string_from_int32_t_float.java | 20 + ...ction_std_string_from_int32_t_int32_t.java | 20 + .../mrbind_test/ffi/std_function_void.java | 20 + ...d_function_void_from_MR_StdFunction_A.java | 20 + ...td_function_void_from_int32_t_int32_t.java | 20 + .../std_function_void_from_std_string.java | 20 + ...d_list_MR_StdContainers_NonAssignable.java | 59 + .../src/mrbind_test/ffi/std_list_int32_t.java | 61 + ..._MR_StdContainers_NonAssignable_float.java | 53 + .../ffi/std_map_int32_t_float.java | 53 + ..._MR_StdContainers_NonAssignable_float.java | 52 + .../ffi/std_multimap_int32_t_float.java | 52 + ...ltiset_MR_StdContainers_NonAssignable.java | 35 + .../mrbind_test/ffi/std_multiset_float.java | 37 + .../mrbind_test/ffi/std_multiset_int32_t.java | 37 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 22 + .../std_optional_MR_CSharp_NonTrivial.java | 22 + .../ffi/std_optional_MR_CSharp_SA.java | 22 + .../ffi/std_optional_MR_CSharp_Trivial.java | 22 + .../ffi/std_optional_MR_StdOptional_A.java | 22 + .../ffi/std_optional_MR_StdOptional_B.java | 22 + .../ffi/std_optional_MR_StdOptional_E.java | 22 + .../mrbind_test/ffi/std_optional_int32_t.java | 22 + .../ffi/std_optional_std_string.java | 22 + ..._MR_StdContainers_NonAssignable_float.java | 19 + .../ffi/std_pair_const_int32_t_float.java | 20 + ...air_const_int32_t_ref_const_float_ref.java | 18 + ...2_t_rvalue_ref_const_float_rvalue_ref.java | 18 + .../ffi/std_pair_int32_t_float.java | 22 + .../ffi/std_pair_int32_t_ref_float_ref.java | 17 + ...r_int32_t_rvalue_ref_float_rvalue_ref.java | 18 + .../ffi/std_pair_int32_t_std_string.java | 22 + ...td_set_MR_StdContainers_NonAssignable.java | 35 + .../src/mrbind_test/ffi/std_set_float.java | 37 + .../src/mrbind_test/ffi/std_set_int32_t.java | 37 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SA.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SE.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SG.java | 29 + .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 30 + .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 30 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 31 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 29 + .../std_shared_ptr_const_MR_CSharp_SA.java | 32 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 32 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 33 + ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 31 + .../ffi/std_shared_ptr_const_int32_t.java | 32 + .../std_shared_ptr_const_int32_t_array.java | 33 + ...std_shared_ptr_const_int32_t_array_42.java | 31 + .../ffi/std_shared_ptr_const_void.java | 27 + .../ffi/std_shared_ptr_int32_t.java | 30 + .../ffi/std_shared_ptr_int32_t_array.java | 31 + .../ffi/std_shared_ptr_int32_t_array_42.java | 29 + .../mrbind_test/ffi/std_shared_ptr_void.java | 25 + .../src/mrbind_test/ffi/std_string.java | 24 + .../src/mrbind_test/ffi/std_string_view.java | 22 + .../src/mrbind_test/ffi/std_tuple.java | 17 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 20 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 17 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 18 + ...32_t_ref_const_float_ref_int32___98db.java | 25 + ..._ref_const_std_string_rvalue_re__883b.java | 20 + .../std_tuple_const_int32_t_std_string.java | 20 + ...td_tuple_float_double_int32_t_int32_t.java | 26 + .../mrbind_test/ffi/std_tuple_int32_t.java | 20 + .../ffi/std_tuple_int32_t_float.java | 22 + ..._std_string_ref_std_string_rvalue_ref.java | 19 + .../ffi/std_tuple_int32_t_std_string.java | 22 + .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 21 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 22 + .../ffi/std_unique_ptr_int32_t.java | 21 + .../ffi/std_unique_ptr_int32_t_array.java | 22 + ..._MR_StdContainers_NonAssignable_float.java | 51 + .../ffi/std_unordered_map_int32_t_float.java | 51 + ..._MR_StdContainers_NonAssignable_float.java | 50 + .../std_unordered_multimap_int32_t_float.java | 50 + ...ltiset_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_multiset_int32_t.java | 36 + ...ed_set_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_set_int32_t.java | 36 + .../ffi/std_variant_int32_t_float.java | 26 + .../ffi/std_variant_int32_t_float_float.java | 30 + .../std_variant_int32_t_float_std_string.java | 30 + ...d_variant_std_monostate_int32_t_float.java | 29 + ...ant_std_monostate_int32_t_float_float.java | 33 + .../src/mrbind_test/ffi/std_vector_MR_A.java | 70 + .../ffi/std_vector_MR_CSharp_A_ptr.java | 70 + .../std_vector_MR_CSharp_ExposedLayout.java | 74 + ...vector_MR_StdContainers_NonAssignable.java | 63 + ...StdContainers_NonDefaultConstructible.java | 69 + .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 70 + ...td_vector_expected_int32_t_std_string.java | 70 + .../mrbind_test/ffi/std_vector_int32_t.java | 74 + .../mrbind_test/ffi/std_vector_int64_t.java | 74 + .../mrbind_test/ffi/std_vector_uint64_t.java | 74 + .../src/mrbind_test/mr/A.java | 149 + .../src/mrbind_test/mr/CommonBaseAB.java | 83 + .../src/mrbind_test/mr/Functions.java | 120 + .../src/mrbind_test/mr/SeparateA.java | 81 + .../src/mrbind_test/mr/SeparateB.java | 81 + .../src/mrbind_test/mr/abstractclasses/A.java | 34 + .../src/mrbind_test/mr/abstractclasses/B.java | 49 + .../src/mrbind_test/mr/abstractclasses/C.java | 28 + .../src/mrbind_test/mr/adjustingnames/A.java | 203 + .../mr/adjustingnames/Functions.java | 44 + .../src/mrbind_test/mr/aggregates/A.java | 221 + .../src/mrbind_test/mr/aggregates/B.java | 102 + .../src/mrbind_test/mr/aggregates/C.java | 493 ++ .../src/mrbind_test/mr/aggregates/D.java | 506 ++ .../src/mrbind_test/mr/aggregates/E.java | 587 ++ .../aggregates/NonDefaultConstructible.java | 78 + .../src/mrbind_test/mr/bases/A.java | 114 + .../src/mrbind_test/mr/bases/B.java | 110 + .../src/mrbind_test/mr/bases/B2.java | 106 + .../src/mrbind_test/mr/bases/C.java | 107 + .../src/mrbind_test/mr/bases/D.java | 107 + .../src/mrbind_test/mr/bases/D2.java | 106 + .../src/mrbind_test/mr/bases/D3.java | 106 + .../src/mrbind_test/mr/bases/E.java | 108 + .../src/mrbind_test/mr/bases/F.java | 109 + .../src/mrbind_test/mr/bases/G.java | 106 + .../src/mrbind_test/mr/bases/H.java | 108 + .../src/mrbind_test/mr/bases/I.java | 107 + .../src/mrbind_test/mr/convops/A.java | 123 + .../mr/copyinheritedmembers/A.java | 283 + .../mr/copyinheritedmembers/B.java | 273 + .../mr/copyinheritedmembers/C.java | 105 + .../mr/copyinheritedmembers/D.java | 108 + .../mr/copyinheritedmembers/E.java | 107 + .../mr/copyinheritedmembers/F.java | 107 + .../mr/copyinheritedmembers/G.java | 110 + .../mr/copyinheritedmembers/H.java | 106 + .../mr/copyinheritedmembers/I.java | 106 + .../mr/copyinheritedmembers/J.java | 112 + .../mr/copyinheritedmembers/K.java | 107 + .../mr/copyinheritedmembers/L.java | 107 + .../mr/copyinheritedmembers/M.java | 112 + .../mr/copyinheritedmembers/N.java | 111 + .../mr/copyinheritedmembers/O.java | 110 + .../src/mrbind_test/mr/cs/Functions.java | 2568 ++++++ .../mr/cs/expected_MR_CSharp_E1_float.java | 213 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 215 + ...xpected_MR_CSharp_ExposedLayout_float.java | 215 + .../expected_MR_CSharp_NonTrivial_float.java | 215 + .../mr/cs/expected_MR_CSharp_SA_float.java | 215 + .../cs/expected_MR_CSharp_Trivial_float.java | 215 + .../mr/cs/expected_int32_t_float.java | 213 + .../mr/cs/expected_int32_t_std_string.java | 215 + .../mr/cs/expected_void_float.java | 189 + .../cs/std_array_MR_StdContainers_A_42.java | 285 + ...ray_MR_StdContainers_NonAssignable_42.java | 234 + .../mr/cs/std_array_int32_t_43.java | 30 + .../std_array_int32_t_array_4_array_3_5.java | 30 + ..._deque_MR_StdContainers_NonAssignable.java | 647 ++ ...ntainers_NonAssignable_const_iterator.java | 213 + ..._StdContainers_NonAssignable_iterator.java | 186 + .../mrbind_test/mr/cs/std_deque_int32_t.java | 837 ++ .../cs/std_deque_int32_t_const_iterator.java | 212 + .../mr/cs/std_deque_int32_t_iterator.java | 185 + .../mr/cs/std_filesystem_path.java | 167 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 164 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 165 + .../mr/cs/std_function_MR_StdFunction_A.java | 164 + ...ction_E_from_int32_t_MR_StdFunction_E.java | 164 + .../mr/cs/std_function_int32_t.java | 164 + ...function_int32_t_from_int32_t_int32_t.java | 164 + .../std_function_int32_t_from_std_string.java | 165 + ...f_from_int32_t_ref_int32_t_rvalue_ref.java | 164 + .../cs/std_function_int32_t_rvalue_ref.java | 164 + ...unction_std_string_from_int32_t_float.java | 164 + ...ction_std_string_from_int32_t_int32_t.java | 164 + .../mrbind_test/mr/cs/std_function_void.java | 163 + ...d_function_void_from_MR_StdFunction_A.java | 164 + ...td_function_void_from_int32_t_int32_t.java | 163 + .../cs/std_function_void_from_std_string.java | 164 + .../src/mrbind_test/mr/cs/std_istream.java | 13 + ...d_list_MR_StdContainers_NonAssignable.java | 667 ++ ...ntainers_NonAssignable_const_iterator.java | 192 + ..._StdContainers_NonAssignable_iterator.java | 165 + .../mrbind_test/mr/cs/std_list_int32_t.java | 702 ++ .../cs/std_list_int32_t_const_iterator.java | 191 + .../mr/cs/std_list_int32_t_iterator.java | 164 + ..._MR_StdContainers_NonAssignable_float.java | 443 + ...rs_NonAssignable_float_const_iterator.java | 239 + ...ntainers_NonAssignable_float_iterator.java | 212 + .../mr/cs/std_map_int32_t_float.java | 439 + .../std_map_int32_t_float_const_iterator.java | 238 + .../mr/cs/std_map_int32_t_float_iterator.java | 211 + ..._MR_StdContainers_NonAssignable_float.java | 419 + ...rs_NonAssignable_float_const_iterator.java | 239 + ...ntainers_NonAssignable_float_iterator.java | 212 + .../mr/cs/std_multimap_int32_t_float.java | 416 + ...multimap_int32_t_float_const_iterator.java | 238 + .../std_multimap_int32_t_float_iterator.java | 211 + ...ltiset_MR_StdContainers_NonAssignable.java | 326 + ...ntainers_NonAssignable_const_iterator.java | 165 + .../mrbind_test/mr/cs/std_multiset_float.java | 366 + .../cs/std_multiset_float_const_iterator.java | 164 + .../mr/cs/std_multiset_int32_t.java | 367 + .../std_multiset_int32_t_const_iterator.java | 164 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 218 + .../cs/std_optional_MR_CSharp_NonTrivial.java | 218 + .../mr/cs/std_optional_MR_CSharp_SA.java | 218 + .../mr/cs/std_optional_MR_CSharp_Trivial.java | 218 + .../mr/cs/std_optional_MR_StdOptional_A.java | 218 + .../mr/cs/std_optional_MR_StdOptional_B.java | 218 + .../mr/cs/std_optional_MR_StdOptional_E.java | 211 + .../mr/cs/std_optional_int32_t.java | 211 + .../mr/cs/std_optional_std_string.java | 213 + .../src/mrbind_test/mr/cs/std_ostream.java | 13 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 202 + ..._MR_StdContainers_NonAssignable_float.java | 146 + .../mr/cs/std_pair_const_int32_t_float.java | 169 + ...air_const_int32_t_ref_const_float_ref.java | 124 + ...2_t_rvalue_ref_const_float_rvalue_ref.java | 124 + .../mr/cs/std_pair_int32_t_float.java | 215 + .../mr/cs/std_pair_int32_t_ref_float_ref.java | 96 + ...r_int32_t_rvalue_ref_float_rvalue_ref.java | 124 + .../mr/cs/std_pair_int32_t_std_string.java | 219 + ...td_set_MR_StdContainers_NonAssignable.java | 326 + ...ntainers_NonAssignable_const_iterator.java | 165 + .../src/mrbind_test/mr/cs/std_set_float.java | 366 + .../mr/cs/std_set_float_const_iterator.java | 164 + .../mrbind_test/mr/cs/std_set_int32_t.java | 367 + .../mr/cs/std_set_int32_t_const_iterator.java | 164 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 402 + .../mr/cs/std_shared_ptr_MR_CSharp_SA.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SE.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SG.java | 374 + .../mr/cs/std_shared_ptr_MR_CommonBaseAB.java | 397 + .../cs/std_shared_ptr_MR_StdSharedPtr_A.java | 397 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 422 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 374 + .../cs/std_shared_ptr_const_MR_CSharp_SA.java | 451 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 451 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 476 ++ ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 428 + .../mr/cs/std_shared_ptr_const_int32_t.java | 439 + .../std_shared_ptr_const_int32_t_array.java | 472 ++ ...std_shared_ptr_const_int32_t_array_42.java | 425 + .../mr/cs/std_shared_ptr_const_void.java | 337 + .../mr/cs/std_shared_ptr_int32_t.java | 390 + .../mr/cs/std_shared_ptr_int32_t_array.java | 413 + .../cs/std_shared_ptr_int32_t_array_42.java | 366 + .../mr/cs/std_shared_ptr_void.java | 288 + .../src/mrbind_test/mr/cs/std_string.java | 276 + .../mrbind_test/mr/cs/std_string_view.java | 215 + .../src/mrbind_test/mr/cs/std_tuple.java | 99 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 178 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 103 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 131 + ...ef_const_float_ref_int32_t___a385e102.java | 287 + ...tring_ref_const_std_string_rvalue_ref.java | 176 + .../std_tuple_const_int32_t_std_string.java | 173 + ...td_tuple_float_double_int32_t_int32_t.java | 308 + .../mrbind_test/mr/cs/std_tuple_int32_t.java | 169 + .../mr/cs/std_tuple_int32_t_float.java | 215 + ..._std_string_ref_std_string_rvalue_ref.java | 151 + .../mr/cs/std_tuple_int32_t_std_string.java | 219 + .../cs/std_unique_ptr_MR_StdUniquePtr_A.java | 191 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 216 + .../mr/cs/std_unique_ptr_int32_t.java | 189 + .../mr/cs/std_unique_ptr_int32_t_array.java | 213 + ..._MR_StdContainers_NonAssignable_float.java | 443 + ...rs_NonAssignable_float_const_iterator.java | 218 + ...ntainers_NonAssignable_float_iterator.java | 191 + .../cs/std_unordered_map_int32_t_float.java | 439 + ...ered_map_int32_t_float_const_iterator.java | 217 + ..._unordered_map_int32_t_float_iterator.java | 190 + ..._MR_StdContainers_NonAssignable_float.java | 419 + ...rs_NonAssignable_float_const_iterator.java | 218 + ...ntainers_NonAssignable_float_iterator.java | 191 + .../std_unordered_multimap_int32_t_float.java | 416 + ...multimap_int32_t_float_const_iterator.java | 217 + ...dered_multimap_int32_t_float_iterator.java | 190 + ...ltiset_MR_StdContainers_NonAssignable.java | 303 + ...ntainers_NonAssignable_const_iterator.java | 144 + .../mr/cs/std_unordered_multiset_int32_t.java | 367 + ...dered_multiset_int32_t_const_iterator.java | 143 + ...ed_set_MR_StdContainers_NonAssignable.java | 303 + ...ntainers_NonAssignable_const_iterator.java | 144 + .../mr/cs/std_unordered_set_int32_t.java | 367 + ..._unordered_set_int32_t_const_iterator.java | 143 + .../mr/cs/std_variant_int32_t_float.java | 303 + .../cs/std_variant_int32_t_float_float.java | 383 + .../std_variant_int32_t_float_std_string.java | 399 + ...d_variant_std_monostate_int32_t_float.java | 362 + ...ant_std_monostate_int32_t_float_float.java | 442 + .../mrbind_test/mr/cs/std_vector_MR_A.java | 825 ++ .../mr/cs/std_vector_MR_A_const_iterator.java | 213 + .../mr/cs/std_vector_MR_A_iterator.java | 186 + .../mr/cs/std_vector_MR_CSharp_A_ptr.java | 819 ++ ...vector_MR_CSharp_A_ptr_const_iterator.java | 212 + .../std_vector_MR_CSharp_A_ptr_iterator.java | 185 + .../std_vector_MR_CSharp_ExposedLayout.java | 920 ++ ...R_CSharp_ExposedLayout_const_iterator.java | 213 + ...ctor_MR_CSharp_ExposedLayout_iterator.java | 186 + .../mr/cs/std_vector_MR_SeparateA.java | 804 ++ ...td_vector_MR_SeparateA_const_iterator.java | 213 + .../cs/std_vector_MR_SeparateA_iterator.java | 186 + .../mr/cs/std_vector_MR_SeparateB.java | 804 ++ ...td_vector_MR_SeparateB_const_iterator.java | 213 + .../cs/std_vector_MR_SeparateB_iterator.java | 186 + ...vector_MR_StdContainers_NonAssignable.java | 667 ++ ...ntainers_NonAssignable_const_iterator.java | 213 + ..._StdContainers_NonAssignable_iterator.java | 186 + ...StdContainers_NonDefaultConstructible.java | 804 ++ ...onDefaultConstructible_const_iterator.java | 213 + ...ners_NonDefaultConstructible_iterator.java | 186 + .../cs/std_vector_const_MR_CSharp_A_ptr.java | 819 ++ ..._const_MR_CSharp_A_ptr_const_iterator.java | 212 + ...vector_const_MR_CSharp_A_ptr_iterator.java | 185 + ...td_vector_expected_int32_t_std_string.java | 825 ++ ...ted_int32_t_std_string_const_iterator.java | 213 + ..._expected_int32_t_std_string_iterator.java | 186 + .../mrbind_test/mr/cs/std_vector_int32_t.java | 904 ++ .../cs/std_vector_int32_t_const_iterator.java | 212 + .../mr/cs/std_vector_int32_t_iterator.java | 185 + .../mrbind_test/mr/cs/std_vector_int64_t.java | 904 ++ .../cs/std_vector_int64_t_const_iterator.java | 212 + .../mr/cs/std_vector_int64_t_iterator.java | 185 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 804 ++ ...SeparateA_MR_SeparateB_const_iterator.java | 213 + ...ir_MR_SeparateA_MR_SeparateB_iterator.java | 186 + .../mr/cs/std_vector_uint64_t.java | 904 ++ .../std_vector_uint64_t_const_iterator.java | 212 + .../mr/cs/std_vector_uint64_t_iterator.java | 185 + .../src/mrbind_test/mr/csharp/A.java | 249 + .../mr/csharp/AmbiguousTemplates.java | 250 + .../mrbind_test/mr/csharp/ArrayMembers.java | 465 ++ .../src/mrbind_test/mr/csharp/B.java | 127 + .../src/mrbind_test/mr/csharp/C.java | 104 + .../src/mrbind_test/mr/csharp/CallOp.java | 146 + .../mr/csharp/ClassMemberPointersBool.java | 324 + .../mr/csharp/ClassMemberPointersClass.java | 346 + .../mr/csharp/ClassMemberPointersExposed.java | 345 + .../mr/csharp/ClassMemberPointersUshort.java | 324 + .../mr/csharp/ConstNonconstConflicts.java | 246 + .../src/mrbind_test/mr/csharp/ConvCtor.java | 218 + .../mr/csharp/ConvCtorCopyButNoMove.java | 104 + .../mr/csharp/ConvCtorExposed.java | 54 + .../mr/csharp/ConvCtorNonTrivial.java | 125 + .../csharp/ConvCtorNonTrivialRestricted.java | 104 + .../mr/csharp/ConvCtorTrivial.java | 125 + .../mr/csharp/ConvCtorWithDefArg.java | 102 + .../src/mrbind_test/mr/csharp/ConvOp.java | 146 + .../mrbind_test/mr/csharp/ConvOpToRef.java | 171 + .../src/mrbind_test/mr/csharp/D.java | 147 + .../src/mrbind_test/mr/csharp/E.java | 148 + .../src/mrbind_test/mr/csharp/E1.java | 45 + .../src/mrbind_test/mr/csharp/E2.java | 34 + .../src/mrbind_test/mr/csharp/EqualityA.java | 169 + .../src/mrbind_test/mr/csharp/EqualityB.java | 169 + .../src/mrbind_test/mr/csharp/EqualityC.java | 166 + .../src/mrbind_test/mr/csharp/EqualityD.java | 124 + .../src/mrbind_test/mr/csharp/EqualityE.java | 125 + .../mrbind_test/mr/csharp/ExposedLayout.java | 272 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 82 + .../mrbind_test/mr/csharp/ExposedLayoutC.java | 31 + .../mr/csharp/ExposedLayoutSh.java | 294 + .../src/mrbind_test/mr/csharp/F.java | 106 + .../src/mrbind_test/mr/csharp/Functions.java | 7101 ++++++++++++++++ .../src/mrbind_test/mr/csharp/G.java | 108 + .../src/mrbind_test/mr/csharp/IncrDecrA.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 192 + .../src/mrbind_test/mr/csharp/IncrDecrC.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrD.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrE.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrF.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrG.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrH.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrI.java | 102 + .../src/mrbind_test/mr/csharp/IndexerA.java | 193 + .../src/mrbind_test/mr/csharp/IndexerB.java | 245 + .../src/mrbind_test/mr/csharp/IndexerC.java | 145 + .../src/mrbind_test/mr/csharp/IterableA.java | 189 + .../src/mrbind_test/mr/csharp/IterableB.java | 189 + .../src/mrbind_test/mr/csharp/IterableC.java | 235 + .../src/mrbind_test/mr/csharp/IterableD.java | 143 + .../src/mrbind_test/mr/csharp/IterableE.java | 143 + .../src/mrbind_test/mr/csharp/IterableF.java | 143 + .../src/mrbind_test/mr/csharp/IterableG.java | 192 + .../src/mrbind_test/mr/csharp/IterableH.java | 193 + .../src/mrbind_test/mr/csharp/IterableI.java | 192 + .../src/mrbind_test/mr/csharp/IterableJ.java | 193 + .../src/mrbind_test/mr/csharp/IterableK.java | 190 + .../mrbind_test/mr/csharp/IterableK_Iter.java | 237 + .../mr/csharp/IterableK_Sentinel.java | 170 + .../mr/csharp/IterableL_int32_t.java | 189 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 217 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 249 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 176 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 357 + .../src/mrbind_test/mr/csharp/LifetimesE.java | 226 + .../mrbind_test/mr/csharp/NameConflicts.java | 244 + .../mr/csharp/NameConflictsExposed.java | 55 + .../mr/csharp/NameConflictsExposed_A.java | 30 + .../mr/csharp/NameConflicts_A.java | 101 + .../mr/csharp/NonCopyableClassByValueOps.java | 103 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 101 + .../mr/csharp/NonTrivialClassOps.java | 124 + .../mr/csharp/NonTrivialDerived.java | 101 + .../src/mrbind_test/mr/csharp/Outer.java | 123 + .../mrbind_test/mr/csharp/Outer_Inner.java | 122 + .../mrbind_test/mr/csharp/RelationalA.java | 194 + .../mrbind_test/mr/csharp/RelationalB.java | 194 + .../mrbind_test/mr/csharp/RelationalC.java | 172 + .../mrbind_test/mr/csharp/RelationalD.java | 194 + .../mrbind_test/mr/csharp/RelationalE.java | 194 + .../mrbind_test/mr/csharp/RelationalF.java | 190 + .../src/mrbind_test/mr/csharp/SA.java | 104 + .../src/mrbind_test/mr/csharp/SB.java | 178 + .../src/mrbind_test/mr/csharp/SC.java | 105 + .../src/mrbind_test/mr/csharp/SD.java | 105 + .../src/mrbind_test/mr/csharp/SE.java | 178 + .../src/mrbind_test/mr/csharp/SF.java | 105 + .../src/mrbind_test/mr/csharp/SG.java | 26 + .../mrbind_test/mr/csharp/StaticOpsEnum.java | 27 + .../mrbind_test/mr/csharp/StaticOpsLhsA.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsB.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsC.java | 77 + .../mrbind_test/mr/csharp/StaticOpsLhsD.java | 77 + .../mrbind_test/mr/csharp/StaticOpsLhsE.java | 103 + .../mrbind_test/mr/csharp/StaticOpsLhsF.java | 103 + .../mrbind_test/mr/csharp/StaticOpsLhsG.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsH.java | 103 + .../mr/csharp/StaticOpsMixedLhs.java | 101 + .../mr/csharp/StaticOpsMixedRhs.java | 101 + .../mrbind_test/mr/csharp/StaticOpsRhsA.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsB.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsC.java | 77 + .../mrbind_test/mr/csharp/StaticOpsRhsD.java | 77 + .../mrbind_test/mr/csharp/StaticOpsRhsE.java | 103 + .../mrbind_test/mr/csharp/StaticOpsRhsF.java | 103 + .../mrbind_test/mr/csharp/StaticOpsRhsG.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsH.java | 103 + .../mr/csharp/StringConvFsPath.java | 123 + .../mr/csharp/StringConvString.java | 125 + .../mr/csharp/StringConvStringView.java | 124 + .../mrbind_test/mr/csharp/TestConstness.java | 143 + .../src/mrbind_test/mr/csharp/TestFields.java | 511 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 853 ++ .../src/mrbind_test/mr/csharp/TestOpsB.java | 853 ++ .../src/mrbind_test/mr/csharp/TestOpsC.java | 841 ++ .../mr/csharp/TestStdFunction.java | 492 ++ .../src/mrbind_test/mr/csharp/Trivial.java | 101 + .../mrbind_test/mr/csharp/TrivialDerived.java | 101 + .../mrbind_test/mr/customprefnames/Af.java | 101 + .../mrbind_test/mr/customprefnames/Ai.java | 101 + .../mr/customprefnames/Functions.java | 25 + .../src/mrbind_test/mr/declorder/A.java | 75 + .../src/mrbind_test/mr/declorder/A_B.java | 74 + .../src/mrbind_test/mr/declorder/A_E.java | 25 + .../src/mrbind_test/mr/declorder/C_false.java | 52 + .../src/mrbind_test/mr/declorder/C_true.java | 52 + .../mrbind_test/mr/deprecation/Functions.java | 44 + .../A_MR_IncludesForEnumConstants_E_e1.java | 101 + .../mr/includesforenumconstants/E.java | 28 + .../includesforenumconstants/Functions.java | 27 + .../mr/incompletearrayelemtype/E.java | 27 + .../mr/incompletearrayelemtype/Functions.java | 42 + .../src/mrbind_test/mr/iostream/A.java | 101 + .../mrbind_test/mr/iostream/Functions.java | 52 + .../mrbind_test/mr/lifetimeinference/A.java | 216 + .../mrbind_test/mr/lifetimeinference/B.java | 170 + .../mrbind_test/mr/lifetimeinference/C.java | 105 + .../mr/lifetimeinference/Functions.java | 100 + .../src/mrbind_test/mr/matchinglayout/A.java | 97 + .../src/mrbind_test/mr/matchinglayout/B.java | 58 + .../mr/matchinglayout/Functions.java | 91 + .../src/mrbind_test/mr/membervars/A.java | 241 + .../mr/nestedtemplateinst/A_int32_t.java | 101 + .../A_int32_t_AA_float.java | 102 + .../src/mrbind_test/mr/nestedtypes/A.java | 222 + .../src/mrbind_test/mr/nestedtypes/A_B.java | 101 + .../src/mrbind_test/mr/nestedtypes/A_E.java | 25 + .../mr/omittingtargsandquals/A_float.java | 124 + .../mr/omittingtargsandquals/A_int32_t.java | 146 + .../mr/omittingtargsandquals/Functions.java | 173 + .../src/mrbind_test/mr/overloadedops/A.java | 1103 +++ .../src/mrbind_test/mr/overloadedops/B.java | 102 + .../src/mrbind_test/mr/overloadedops/C.java | 102 + .../src/mrbind_test/mr/overloadedops/D.java | 148 + .../mr/overloadedops/Functions.java | 1052 +++ .../mrbind_test/mr/overloads/Functions.java | 249 + .../src/mrbind_test/mr/phmap/Functions.java | 260 + .../mrbind_test/mr/signaturefilters/A.java | 101 + .../mrbind_test/mr/signaturefilters/Blah.java | 148 + .../mr/signaturefilters/Functions.java | 207 + .../src/mrbind_test/mr/staticfuncs/A.java | 154 + .../src/mrbind_test/mr/stdcontainers/A.java | 102 + .../mr/stdcontainers/Functions.java | 744 ++ .../mr/stdcontainers/NonAssignable.java | 123 + .../NonDefaultConstructible.java | 102 + .../mrbind_test/mr/stdexpected/Functions.java | 230 + .../mr/stdfilesystem/Functions.java | 98 + .../src/mrbind_test/mr/stdfunction/A.java | 173 + .../src/mrbind_test/mr/stdfunction/E.java | 25 + .../mrbind_test/mr/stdfunction/Functions.java | 176 + .../src/mrbind_test/mr/stdoptional/A.java | 170 + .../src/mrbind_test/mr/stdoptional/B.java | 173 + .../src/mrbind_test/mr/stdoptional/E.java | 28 + .../mrbind_test/mr/stdoptional/Functions.java | 392 + .../src/mrbind_test/mr/stdsharedptr/A.java | 102 + .../mr/stdsharedptr/Functions.java | 814 ++ .../mrbind_test/mr/stdstring/Functions.java | 158 + .../mr/stdstringview/Functions.java | 158 + .../mr/stdtuplelike/Functions.java | 231 + .../src/mrbind_test/mr/stduniqueptr/A.java | 102 + .../mr/stduniqueptr/Functions.java | 596 ++ .../mrbind_test/mr/stdvariant/Functions.java | 86 + .../src/mrbind_test/mr/tags/Functions.java | 93 + .../ClassTemplate_uint64_t.java | 207 + .../ClassTemplate_uint64_t_Enum.java | 27 + .../src/mrbind_test/mr/testsimpletypes/E.java | 28 + .../mrbind_test/mr/testsimpletypes/E2.java | 30 + .../mrbind_test/mr/testsimpletypes/E3.java | 27 + .../mrbind_test/mr/testsimpletypes/E4.java | 27 + .../mrbind_test/mr/testsimpletypes/E5.java | 27 + .../mr/testsimpletypes/Functions.java | 860 ++ .../mrbind_test/mr/testsizet/A_uint64_t.java | 123 + .../mrbind_test/mr/testsizet/Functions.java | 124 + .../mr/typedefsintemplates/A_int32_t.java | 125 + .../mr/typedefsintemplates/B_int32_t.java | 101 + .../B_int32_t_BB_float.java | 145 + .../mr/typedefsintemplates/Functions.java | 25 + .../src/mrbind_test/mr/usingdecls/A.java | 267 + .../src/mrbind_test/mr/usingdecls/A_E.java | 25 + .../src/mrbind_test/mr/usingdecls/B.java | 81 + .../phmap/phmap_btree_map_int32_t_float.java | 439 + ...tree_map_int32_t_float_const_iterator.java | 238 + ...hmap_btree_map_int32_t_float_iterator.java | 211 + .../phmap_btree_multimap_int32_t_float.java | 416 + ...multimap_int32_t_float_const_iterator.java | 238 + ...btree_multimap_int32_t_float_iterator.java | 211 + .../phmap/phmap_btree_multiset_int32_t.java | 367 + ...btree_multiset_int32_t_const_iterator.java | 164 + .../phmap/phmap_btree_set_int32_t.java | 367 + ...hmap_btree_set_int32_t_const_iterator.java | 164 + .../phmap_flat_hash_map_int32_t_float.java | 439 + ...hash_map_int32_t_float_const_iterator.java | 217 + ..._flat_hash_map_int32_t_float_iterator.java | 190 + .../phmap/phmap_flat_hash_set_int32_t.java | 367 + ..._flat_hash_set_int32_t_const_iterator.java | 143 + .../phmap_node_hash_map_int32_t_float.java | 439 + ...hash_map_int32_t_float_const_iterator.java | 217 + ..._node_hash_map_int32_t_float_iterator.java | 190 + .../phmap/phmap_node_hash_set_int32_t.java | 367 + ..._node_hash_set_int32_t_const_iterator.java | 143 + ..._parallel_flat_hash_map_int32_t_float.java | 439 + ...hash_map_int32_t_float_const_iterator.java | 217 + ..._flat_hash_map_int32_t_float_iterator.java | 190 + .../phmap_parallel_flat_hash_set_int32_t.java | 367 + ..._flat_hash_set_int32_t_const_iterator.java | 143 + ..._parallel_node_hash_map_int32_t_float.java | 439 + ...hash_map_int32_t_float_const_iterator.java | 217 + ..._node_hash_map_int32_t_float_iterator.java | 190 + .../phmap_parallel_node_hash_set_int32_t.java | 367 + ..._node_hash_set_int32_t_const_iterator.java | 143 + .../src/mrbind_test/CppException.java | 9 + .../src/mrbind_test/CppObject.java | 90 + .../src/mrbind_test/CppStruct.java | 22 + .../src/mrbind_test/Ffi.java | 214 + .../src/mrbind_test/Native.java | 8 + .../src/mrbind_test/ffi/A/a.java | 17 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 21 + .../common/std_shared_ptr_MR_SeparateA.java | 30 + .../common/std_shared_ptr_MR_SeparateB.java | 30 + .../AB/common/std_vector_MR_SeparateA.java | 69 + .../AB/common/std_vector_MR_SeparateB.java | 69 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 69 + .../src/mrbind_test/ffi/AB_base/ab_base.java | 17 + .../src/mrbind_test/ffi/B/b.java | 17 + .../src/mrbind_test/ffi/MR/_1.java | 22 + .../ffi/MR/test_abstract_classes.java | 18 + .../ffi/MR/test_adjusting_names.java | 25 + .../mrbind_test/ffi/MR/test_aggregates.java | 126 + .../MR/test_arrays_of_incomplete_types.java | 14 + .../MR/test_arrays_of_incomplete_types_2.java | 14 + .../src/mrbind_test/ffi/MR/test_bases.java | 61 + .../mrbind_test/ffi/MR/test_combined_a_b.java | 14 + .../src/mrbind_test/ffi/MR/test_conv_ops.java | 18 + .../ffi/MR/test_copy_inherited_members.java | 165 + .../src/mrbind_test/ffi/MR/test_csharp.java | 1346 +++ .../ffi/MR/test_custom_preferred_names.java | 22 + .../ffi/MR/test_declaration_order.java | 19 + .../mrbind_test/ffi/MR/test_deprecation.java | 15 + .../MR/test_includes_for_enum_constants.java | 14 + .../test_includes_for_enum_constants_2.java | 17 + .../test_includes_for_enum_constants_3.java | 7 + .../src/mrbind_test/ffi/MR/test_iostream.java | 19 + .../ffi/MR/test_lifetime_inference.java | 39 + .../ffi/MR/test_matching_layout.java | 21 + .../mrbind_test/ffi/MR/test_member_vars.java | 27 + .../ffi/MR/test_mention_blacklists.java | 34 + .../MR/test_nested_class_template_inst.java | 21 + .../mrbind_test/ffi/MR/test_nested_types.java | 28 + ...test_omitting_template_args_and_quals.java | 32 + .../ffi/MR/test_overloaded_operators.java | 117 + .../mrbind_test/ffi/MR/test_overloads.java | 27 + .../src/mrbind_test/ffi/MR/test_phmap.java | 25 + .../mrbind_test/ffi/MR/test_simple_types.java | 72 + .../ffi/MR/test_size_t_ptrdiff_t.java | 24 + .../ffi/MR/test_static_memberr.java | 21 + .../ffi/MR/test_std_containers.java | 65 + .../mrbind_test/ffi/MR/test_std_expected.java | 24 + .../ffi/MR/test_std_filesystem.java | 18 + .../mrbind_test/ffi/MR/test_std_function.java | 29 + .../mrbind_test/ffi/MR/test_std_optional.java | 49 + .../ffi/MR/test_std_shared_ptr.java | 57 + .../mrbind_test/ffi/MR/test_std_string.java | 21 + .../ffi/MR/test_std_string_view.java | 21 + .../ffi/MR/test_std_tuple_like.java | 25 + .../ffi/MR/test_std_unique_ptr.java | 50 + .../src/mrbind_test/ffi/MR/test_tags.java | 18 + .../ffi/MR/test_typedefs_in_templates.java | 29 + .../mrbind_test/ffi/MR/test_using_decls.java | 40 + .../src/mrbind_test/ffi/MR/test_variant.java | 17 + .../src/mrbind_test/ffi/iostream.java | 17 + .../ffi/phmap_btree_map_int_float.java | 53 + .../ffi/phmap_btree_multimap_int_float.java | 52 + .../ffi/phmap_btree_multiset_int.java | 37 + .../mrbind_test/ffi/phmap_btree_set_int.java | 37 + .../ffi/phmap_flat_hash_map_int_float.java | 51 + .../ffi/phmap_flat_hash_set_int.java | 36 + .../ffi/phmap_node_hash_map_int_float.java | 51 + .../ffi/phmap_node_hash_set_int.java | 36 + ...hmap_parallel_flat_hash_map_int_float.java | 51 + .../ffi/phmap_parallel_flat_hash_set_int.java | 36 + ...hmap_parallel_node_hash_map_int_float.java | 51 + .../ffi/phmap_parallel_node_hash_set_int.java | 36 + .../ffi/std_array_MR_StdContainers_A_42.java | 25 + ...ray_MR_StdContainers_NonAssignable_42.java | 23 + .../src/mrbind_test/ffi/std_array_int_43.java | 7 + .../ffi/std_array_int_array_4_array_3_5.java | 7 + ..._deque_MR_StdContainers_NonAssignable.java | 62 + .../src/mrbind_test/ffi/std_deque_int.java | 71 + .../ffi/std_expected_MR_CSharp_E1_float.java | 22 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 22 + ...xpected_MR_CSharp_ExposedLayout_float.java | 22 + ...d_expected_MR_CSharp_NonTrivial_float.java | 22 + .../ffi/std_expected_MR_CSharp_SA_float.java | 22 + .../std_expected_MR_CSharp_Trivial_float.java | 22 + .../ffi/std_expected_int_float.java | 22 + .../ffi/std_expected_int_std_string.java | 22 + .../ffi/std_expected_void_float.java | 21 + .../mrbind_test/ffi/std_filesystem_path.java | 20 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 20 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 20 + .../ffi/std_function_MR_StdFunction_A.java | 20 + ...dFunction_E_from_int_MR_StdFunction_E.java | 20 + .../src/mrbind_test/ffi/std_function_int.java | 20 + .../ffi/std_function_int_from_int_int.java | 20 + .../ffi/std_function_int_from_std_string.java | 20 + ...n_int_ref_from_int_ref_int_rvalue_ref.java | 20 + .../ffi/std_function_int_rvalue_ref.java | 20 + ...td_function_std_string_from_int_float.java | 20 + .../std_function_std_string_from_int_int.java | 20 + .../mrbind_test/ffi/std_function_void.java | 20 + ...d_function_void_from_MR_StdFunction_A.java | 20 + .../ffi/std_function_void_from_int_int.java | 20 + .../std_function_void_from_std_string.java | 20 + ...d_list_MR_StdContainers_NonAssignable.java | 59 + .../src/mrbind_test/ffi/std_list_int.java | 61 + ..._MR_StdContainers_NonAssignable_float.java | 53 + .../mrbind_test/ffi/std_map_int_float.java | 53 + ..._MR_StdContainers_NonAssignable_float.java | 52 + .../ffi/std_multimap_int_float.java | 52 + ...ltiset_MR_StdContainers_NonAssignable.java | 35 + .../mrbind_test/ffi/std_multiset_float.java | 37 + .../src/mrbind_test/ffi/std_multiset_int.java | 37 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 22 + .../std_optional_MR_CSharp_NonTrivial.java | 22 + .../ffi/std_optional_MR_CSharp_SA.java | 22 + .../ffi/std_optional_MR_CSharp_Trivial.java | 22 + .../ffi/std_optional_MR_StdOptional_A.java | 22 + .../ffi/std_optional_MR_StdOptional_B.java | 22 + .../ffi/std_optional_MR_StdOptional_E.java | 22 + .../src/mrbind_test/ffi/std_optional_int.java | 22 + .../ffi/std_optional_std_string.java | 22 + ..._MR_StdContainers_NonAssignable_float.java | 19 + .../ffi/std_pair_const_int_float.java | 20 + ...td_pair_const_int_ref_const_float_ref.java | 18 + ...int_rvalue_ref_const_float_rvalue_ref.java | 18 + .../mrbind_test/ffi/std_pair_int_float.java | 22 + .../ffi/std_pair_int_ref_float_ref.java | 17 + ..._pair_int_rvalue_ref_float_rvalue_ref.java | 18 + .../ffi/std_pair_int_std_string.java | 22 + ...td_set_MR_StdContainers_NonAssignable.java | 35 + .../src/mrbind_test/ffi/std_set_float.java | 37 + .../src/mrbind_test/ffi/std_set_int.java | 37 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SA.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SB.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SC.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SD.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SE.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SF.java | 30 + .../ffi/std_shared_ptr_MR_CSharp_SG.java | 29 + .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 30 + .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 30 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 31 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 29 + .../std_shared_ptr_const_MR_CSharp_SA.java | 32 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 32 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 33 + ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 31 + .../ffi/std_shared_ptr_const_int.java | 32 + .../ffi/std_shared_ptr_const_int_array.java | 33 + .../std_shared_ptr_const_int_array_42.java | 31 + .../ffi/std_shared_ptr_const_void.java | 27 + .../mrbind_test/ffi/std_shared_ptr_int.java | 30 + .../ffi/std_shared_ptr_int_array.java | 31 + .../ffi/std_shared_ptr_int_array_42.java | 29 + .../mrbind_test/ffi/std_shared_ptr_void.java | 25 + .../src/mrbind_test/ffi/std_string.java | 24 + .../src/mrbind_test/ffi/std_string_view.java | 22 + .../src/mrbind_test/ffi/std_tuple.java | 17 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 20 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 17 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 18 + ...st_float_ref_int_rvalue_ref_flo__22dd.java | 25 + ...tring_ref_const_std_string_rvalue_ref.java | 20 + .../ffi/std_tuple_const_int_std_string.java | 20 + .../ffi/std_tuple_float_double_int_int.java | 26 + .../src/mrbind_test/ffi/std_tuple_int.java | 20 + .../mrbind_test/ffi/std_tuple_int_float.java | 22 + ..._std_string_ref_std_string_rvalue_ref.java | 19 + .../ffi/std_tuple_int_std_string.java | 22 + .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 21 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 22 + .../mrbind_test/ffi/std_unique_ptr_int.java | 21 + .../ffi/std_unique_ptr_int_array.java | 22 + ..._MR_StdContainers_NonAssignable_float.java | 51 + .../ffi/std_unordered_map_int_float.java | 51 + ..._MR_StdContainers_NonAssignable_float.java | 50 + .../ffi/std_unordered_multimap_int_float.java | 50 + ...ltiset_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_multiset_int.java | 36 + ...ed_set_MR_StdContainers_NonAssignable.java | 33 + .../ffi/std_unordered_set_int.java | 36 + .../ffi/std_variant_int_float.java | 26 + .../ffi/std_variant_int_float_float.java | 30 + .../ffi/std_variant_int_float_std_string.java | 30 + .../std_variant_std_monostate_int_float.java | 29 + ...variant_std_monostate_int_float_float.java | 33 + .../src/mrbind_test/ffi/std_vector_MR_A.java | 70 + .../ffi/std_vector_MR_CSharp_A_ptr.java | 70 + .../std_vector_MR_CSharp_ExposedLayout.java | 74 + ...vector_MR_StdContainers_NonAssignable.java | 63 + ...StdContainers_NonDefaultConstructible.java | 69 + .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 70 + .../src/mrbind_test/ffi/std_vector_int.java | 74 + .../mrbind_test/ffi/std_vector_int64_t.java | 74 + ...td_vector_std_expected_int_std_string.java | 70 + .../mrbind_test/ffi/std_vector_uint64_t.java | 74 + .../src/mrbind_test/mr/A.java | 149 + .../src/mrbind_test/mr/CommonBaseAB.java | 83 + .../src/mrbind_test/mr/Functions.java | 120 + .../src/mrbind_test/mr/SeparateA.java | 81 + .../src/mrbind_test/mr/SeparateB.java | 81 + .../src/mrbind_test/mr/abstractclasses/A.java | 34 + .../src/mrbind_test/mr/abstractclasses/B.java | 49 + .../src/mrbind_test/mr/abstractclasses/C.java | 49 + .../src/mrbind_test/mr/adjustingnames/A.java | 203 + .../mr/adjustingnames/Functions.java | 44 + .../src/mrbind_test/mr/aggregates/A.java | 219 + .../src/mrbind_test/mr/aggregates/B.java | 102 + .../src/mrbind_test/mr/aggregates/C.java | 477 ++ .../src/mrbind_test/mr/aggregates/D.java | 520 ++ .../src/mrbind_test/mr/aggregates/E.java | 569 ++ .../aggregates/NonDefaultConstructible.java | 78 + .../src/mrbind_test/mr/bases/A.java | 114 + .../src/mrbind_test/mr/bases/B.java | 110 + .../src/mrbind_test/mr/bases/B2.java | 106 + .../src/mrbind_test/mr/bases/C.java | 107 + .../src/mrbind_test/mr/bases/D.java | 107 + .../src/mrbind_test/mr/bases/D2.java | 106 + .../src/mrbind_test/mr/bases/D3.java | 106 + .../src/mrbind_test/mr/bases/E.java | 108 + .../src/mrbind_test/mr/bases/F.java | 109 + .../src/mrbind_test/mr/bases/G.java | 106 + .../src/mrbind_test/mr/bases/H.java | 108 + .../src/mrbind_test/mr/bases/I.java | 107 + .../src/mrbind_test/mr/convops/A.java | 123 + .../mr/copyinheritedmembers/A.java | 280 + .../mr/copyinheritedmembers/B.java | 270 + .../mr/copyinheritedmembers/C.java | 105 + .../mr/copyinheritedmembers/D.java | 247 + .../mr/copyinheritedmembers/E.java | 107 + .../mr/copyinheritedmembers/F.java | 107 + .../mr/copyinheritedmembers/G.java | 249 + .../mr/copyinheritedmembers/H.java | 245 + .../mr/copyinheritedmembers/I.java | 245 + .../mr/copyinheritedmembers/J.java | 251 + .../mr/copyinheritedmembers/K.java | 107 + .../mr/copyinheritedmembers/L.java | 107 + .../mr/copyinheritedmembers/M.java | 251 + .../mr/copyinheritedmembers/N.java | 250 + .../mr/copyinheritedmembers/O.java | 249 + .../src/mrbind_test/mr/cs/Functions.java | 2568 ++++++ .../cs/std_array_MR_StdContainers_A_42.java | 285 + ...ray_MR_StdContainers_NonAssignable_42.java | 234 + .../mrbind_test/mr/cs/std_array_int_43.java | 30 + .../cs/std_array_int_array_4_array_3_5.java | 30 + ..._deque_MR_StdContainers_NonAssignable.java | 647 ++ ...ntainers_NonAssignable_const_iterator.java | 213 + ..._StdContainers_NonAssignable_iterator.java | 186 + .../src/mrbind_test/mr/cs/std_deque_int.java | 832 ++ .../mr/cs/std_deque_int_const_iterator.java | 212 + .../mr/cs/std_deque_int_iterator.java | 185 + .../cs/std_expected_MR_CSharp_E1_float.java | 213 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 215 + ...xpected_MR_CSharp_ExposedLayout_float.java | 215 + ...d_expected_MR_CSharp_NonTrivial_float.java | 215 + .../cs/std_expected_MR_CSharp_SA_float.java | 215 + .../std_expected_MR_CSharp_Trivial_float.java | 215 + .../mr/cs/std_expected_int_float.java | 213 + .../mr/cs/std_expected_int_std_string.java | 215 + .../mr/cs/std_expected_void_float.java | 189 + .../mr/cs/std_filesystem_path.java | 167 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 164 + ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 165 + .../mr/cs/std_function_MR_StdFunction_A.java | 164 + ...dFunction_E_from_int_MR_StdFunction_E.java | 164 + .../mrbind_test/mr/cs/std_function_int.java | 164 + .../mr/cs/std_function_int_from_int_int.java | 164 + .../cs/std_function_int_from_std_string.java | 165 + ...n_int_ref_from_int_ref_int_rvalue_ref.java | 164 + .../mr/cs/std_function_int_rvalue_ref.java | 164 + ...td_function_std_string_from_int_float.java | 164 + .../std_function_std_string_from_int_int.java | 164 + .../mrbind_test/mr/cs/std_function_void.java | 163 + ...d_function_void_from_MR_StdFunction_A.java | 164 + .../mr/cs/std_function_void_from_int_int.java | 163 + .../cs/std_function_void_from_std_string.java | 164 + .../src/mrbind_test/mr/cs/std_istream.java | 13 + ...d_list_MR_StdContainers_NonAssignable.java | 667 ++ ...ntainers_NonAssignable_const_iterator.java | 192 + ..._StdContainers_NonAssignable_iterator.java | 165 + .../src/mrbind_test/mr/cs/std_list_int.java | 698 ++ .../mr/cs/std_list_int_const_iterator.java | 191 + .../mr/cs/std_list_int_iterator.java | 164 + ..._MR_StdContainers_NonAssignable_float.java | 443 + ...rs_NonAssignable_float_const_iterator.java | 239 + ...ntainers_NonAssignable_float_iterator.java | 212 + .../mrbind_test/mr/cs/std_map_int_float.java | 439 + .../cs/std_map_int_float_const_iterator.java | 238 + .../mr/cs/std_map_int_float_iterator.java | 211 + ..._MR_StdContainers_NonAssignable_float.java | 419 + ...rs_NonAssignable_float_const_iterator.java | 239 + ...ntainers_NonAssignable_float_iterator.java | 212 + .../mr/cs/std_multimap_int_float.java | 416 + ...std_multimap_int_float_const_iterator.java | 238 + .../cs/std_multimap_int_float_iterator.java | 211 + ...ltiset_MR_StdContainers_NonAssignable.java | 326 + ...ntainers_NonAssignable_const_iterator.java | 165 + .../mrbind_test/mr/cs/std_multiset_float.java | 366 + .../cs/std_multiset_float_const_iterator.java | 164 + .../mrbind_test/mr/cs/std_multiset_int.java | 366 + .../cs/std_multiset_int_const_iterator.java | 164 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 218 + .../cs/std_optional_MR_CSharp_NonTrivial.java | 218 + .../mr/cs/std_optional_MR_CSharp_SA.java | 218 + .../mr/cs/std_optional_MR_CSharp_Trivial.java | 218 + .../mr/cs/std_optional_MR_StdOptional_A.java | 218 + .../mr/cs/std_optional_MR_StdOptional_B.java | 218 + .../mr/cs/std_optional_MR_StdOptional_E.java | 211 + .../mrbind_test/mr/cs/std_optional_int.java | 211 + .../mr/cs/std_optional_std_string.java | 213 + .../src/mrbind_test/mr/cs/std_ostream.java | 13 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 202 + ..._MR_StdContainers_NonAssignable_float.java | 146 + .../mr/cs/std_pair_const_int_float.java | 168 + ...td_pair_const_int_ref_const_float_ref.java | 124 + ...int_rvalue_ref_const_float_rvalue_ref.java | 124 + .../mrbind_test/mr/cs/std_pair_int_float.java | 214 + .../mr/cs/std_pair_int_ref_float_ref.java | 96 + ..._pair_int_rvalue_ref_float_rvalue_ref.java | 124 + .../mr/cs/std_pair_int_std_string.java | 218 + ...td_set_MR_StdContainers_NonAssignable.java | 326 + ...ntainers_NonAssignable_const_iterator.java | 165 + .../src/mrbind_test/mr/cs/std_set_float.java | 366 + .../mr/cs/std_set_float_const_iterator.java | 164 + .../src/mrbind_test/mr/cs/std_set_int.java | 366 + .../mr/cs/std_set_int_const_iterator.java | 164 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 402 + .../mr/cs/std_shared_ptr_MR_CSharp_SA.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SB.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SC.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SD.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SE.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SF.java | 397 + .../mr/cs/std_shared_ptr_MR_CSharp_SG.java | 374 + .../mr/cs/std_shared_ptr_MR_CommonBaseAB.java | 397 + .../mr/cs/std_shared_ptr_MR_SeparateA.java | 397 + .../mr/cs/std_shared_ptr_MR_SeparateB.java | 397 + .../cs/std_shared_ptr_MR_StdSharedPtr_A.java | 397 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 422 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 374 + .../cs/std_shared_ptr_const_MR_CSharp_SA.java | 451 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 451 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 476 ++ ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 428 + .../mr/cs/std_shared_ptr_const_int.java | 438 + .../mr/cs/std_shared_ptr_const_int_array.java | 472 ++ .../cs/std_shared_ptr_const_int_array_42.java | 425 + .../mr/cs/std_shared_ptr_const_void.java | 337 + .../mrbind_test/mr/cs/std_shared_ptr_int.java | 389 + .../mr/cs/std_shared_ptr_int_array.java | 413 + .../mr/cs/std_shared_ptr_int_array_42.java | 366 + .../mr/cs/std_shared_ptr_void.java | 288 + .../src/mrbind_test/mr/cs/std_string.java | 276 + .../mrbind_test/mr/cs/std_string_view.java | 215 + .../src/mrbind_test/mr/cs/std_tuple.java | 99 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 178 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 103 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 131 + ...at_ref_int_rvalue_ref_float__e0da444a.java | 286 + ...tring_ref_const_std_string_rvalue_ref.java | 176 + .../mr/cs/std_tuple_const_int_std_string.java | 172 + .../mr/cs/std_tuple_float_double_int_int.java | 306 + .../src/mrbind_test/mr/cs/std_tuple_int.java | 168 + .../mr/cs/std_tuple_int_float.java | 214 + ..._std_string_ref_std_string_rvalue_ref.java | 151 + .../mr/cs/std_tuple_int_std_string.java | 218 + .../cs/std_unique_ptr_MR_StdUniquePtr_A.java | 191 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 216 + .../mrbind_test/mr/cs/std_unique_ptr_int.java | 189 + .../mr/cs/std_unique_ptr_int_array.java | 213 + ..._MR_StdContainers_NonAssignable_float.java | 443 + ...rs_NonAssignable_float_const_iterator.java | 218 + ...ntainers_NonAssignable_float_iterator.java | 191 + .../mr/cs/std_unordered_map_int_float.java | 439 + ...nordered_map_int_float_const_iterator.java | 217 + .../std_unordered_map_int_float_iterator.java | 190 + ..._MR_StdContainers_NonAssignable_float.java | 419 + ...rs_NonAssignable_float_const_iterator.java | 218 + ...ntainers_NonAssignable_float_iterator.java | 191 + .../cs/std_unordered_multimap_int_float.java | 416 + ...red_multimap_int_float_const_iterator.java | 217 + ...unordered_multimap_int_float_iterator.java | 190 + ...ltiset_MR_StdContainers_NonAssignable.java | 303 + ...ntainers_NonAssignable_const_iterator.java | 144 + .../mr/cs/std_unordered_multiset_int.java | 366 + ...unordered_multiset_int_const_iterator.java | 143 + ...ed_set_MR_StdContainers_NonAssignable.java | 303 + ...ntainers_NonAssignable_const_iterator.java | 144 + .../mr/cs/std_unordered_set_int.java | 366 + .../std_unordered_set_int_const_iterator.java | 143 + .../mr/cs/std_variant_int_float.java | 301 + .../mr/cs/std_variant_int_float_float.java | 381 + .../cs/std_variant_int_float_std_string.java | 397 + .../std_variant_std_monostate_int_float.java | 360 + ...variant_std_monostate_int_float_float.java | 440 + .../mrbind_test/mr/cs/std_vector_MR_A.java | 825 ++ .../mr/cs/std_vector_MR_A_const_iterator.java | 213 + .../mr/cs/std_vector_MR_A_iterator.java | 186 + .../mr/cs/std_vector_MR_CSharp_A_ptr.java | 819 ++ ...vector_MR_CSharp_A_ptr_const_iterator.java | 212 + .../std_vector_MR_CSharp_A_ptr_iterator.java | 185 + .../std_vector_MR_CSharp_ExposedLayout.java | 920 ++ ...R_CSharp_ExposedLayout_const_iterator.java | 213 + ...ctor_MR_CSharp_ExposedLayout_iterator.java | 186 + .../mr/cs/std_vector_MR_SeparateA.java | 804 ++ ...td_vector_MR_SeparateA_const_iterator.java | 213 + .../cs/std_vector_MR_SeparateA_iterator.java | 186 + .../mr/cs/std_vector_MR_SeparateB.java | 804 ++ ...td_vector_MR_SeparateB_const_iterator.java | 213 + .../cs/std_vector_MR_SeparateB_iterator.java | 186 + ...vector_MR_StdContainers_NonAssignable.java | 667 ++ ...ntainers_NonAssignable_const_iterator.java | 213 + ..._StdContainers_NonAssignable_iterator.java | 186 + ...StdContainers_NonDefaultConstructible.java | 804 ++ ...onDefaultConstructible_const_iterator.java | 213 + ...ners_NonDefaultConstructible_iterator.java | 186 + .../cs/std_vector_const_MR_CSharp_A_ptr.java | 819 ++ ..._const_MR_CSharp_A_ptr_const_iterator.java | 212 + ...vector_const_MR_CSharp_A_ptr_iterator.java | 185 + .../src/mrbind_test/mr/cs/std_vector_int.java | 900 ++ .../mrbind_test/mr/cs/std_vector_int64_t.java | 904 ++ .../cs/std_vector_int64_t_const_iterator.java | 212 + .../mr/cs/std_vector_int64_t_iterator.java | 185 + .../mr/cs/std_vector_int_const_iterator.java | 212 + .../mr/cs/std_vector_int_iterator.java | 185 + ...td_vector_std_expected_int_std_string.java | 825 ++ ...xpected_int_std_string_const_iterator.java | 213 + ..._std_expected_int_std_string_iterator.java | 186 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 804 ++ ...SeparateA_MR_SeparateB_const_iterator.java | 213 + ...ir_MR_SeparateA_MR_SeparateB_iterator.java | 186 + .../mr/cs/std_vector_uint64_t.java | 904 ++ .../std_vector_uint64_t_const_iterator.java | 212 + .../mr/cs/std_vector_uint64_t_iterator.java | 185 + .../src/mrbind_test/mr/csharp/A.java | 249 + .../mr/csharp/AmbiguousTemplates.java | 250 + .../mrbind_test/mr/csharp/ArrayMembers.java | 464 + .../src/mrbind_test/mr/csharp/B.java | 267 + .../src/mrbind_test/mr/csharp/C.java | 244 + .../src/mrbind_test/mr/csharp/CallOp.java | 146 + .../mr/csharp/ClassMemberPointersBool.java | 324 + .../mr/csharp/ClassMemberPointersClass.java | 346 + .../mr/csharp/ClassMemberPointersExposed.java | 345 + .../mr/csharp/ClassMemberPointersUshort.java | 324 + .../mr/csharp/ConstNonconstConflicts.java | 246 + .../src/mrbind_test/mr/csharp/ConvCtor.java | 218 + .../mr/csharp/ConvCtorCopyButNoMove.java | 104 + .../mr/csharp/ConvCtorExposed.java | 54 + .../mr/csharp/ConvCtorNonTrivial.java | 125 + .../csharp/ConvCtorNonTrivialRestricted.java | 104 + .../mr/csharp/ConvCtorTrivial.java | 125 + .../mr/csharp/ConvCtorWithDefArg.java | 102 + .../src/mrbind_test/mr/csharp/ConvOp.java | 146 + .../mrbind_test/mr/csharp/ConvOpToRef.java | 171 + .../src/mrbind_test/mr/csharp/D.java | 147 + .../src/mrbind_test/mr/csharp/E.java | 148 + .../src/mrbind_test/mr/csharp/E1.java | 45 + .../src/mrbind_test/mr/csharp/E2.java | 34 + .../src/mrbind_test/mr/csharp/EqualityA.java | 169 + .../src/mrbind_test/mr/csharp/EqualityB.java | 169 + .../src/mrbind_test/mr/csharp/EqualityC.java | 166 + .../src/mrbind_test/mr/csharp/EqualityD.java | 124 + .../src/mrbind_test/mr/csharp/EqualityE.java | 125 + .../mrbind_test/mr/csharp/ExposedLayout.java | 272 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 82 + .../mrbind_test/mr/csharp/ExposedLayoutC.java | 31 + .../mr/csharp/ExposedLayoutSh.java | 294 + .../src/mrbind_test/mr/csharp/F.java | 330 + .../src/mrbind_test/mr/csharp/Functions.java | 7085 ++++++++++++++++ .../src/mrbind_test/mr/csharp/G.java | 332 + .../src/mrbind_test/mr/csharp/IncrDecrA.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 192 + .../src/mrbind_test/mr/csharp/IncrDecrC.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrD.java | 193 + .../src/mrbind_test/mr/csharp/IncrDecrE.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrF.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrG.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrH.java | 167 + .../src/mrbind_test/mr/csharp/IncrDecrI.java | 102 + .../src/mrbind_test/mr/csharp/IndexerA.java | 191 + .../src/mrbind_test/mr/csharp/IndexerB.java | 245 + .../src/mrbind_test/mr/csharp/IndexerC.java | 145 + .../src/mrbind_test/mr/csharp/IterableA.java | 187 + .../src/mrbind_test/mr/csharp/IterableB.java | 187 + .../src/mrbind_test/mr/csharp/IterableC.java | 231 + .../src/mrbind_test/mr/csharp/IterableD.java | 143 + .../src/mrbind_test/mr/csharp/IterableE.java | 143 + .../src/mrbind_test/mr/csharp/IterableF.java | 143 + .../src/mrbind_test/mr/csharp/IterableG.java | 190 + .../src/mrbind_test/mr/csharp/IterableH.java | 191 + .../src/mrbind_test/mr/csharp/IterableI.java | 190 + .../src/mrbind_test/mr/csharp/IterableJ.java | 191 + .../src/mrbind_test/mr/csharp/IterableK.java | 188 + .../mrbind_test/mr/csharp/IterableK_Iter.java | 236 + .../mr/csharp/IterableK_Sentinel.java | 170 + .../mrbind_test/mr/csharp/IterableL_int.java | 187 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 215 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 246 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 176 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 357 + .../src/mrbind_test/mr/csharp/LifetimesE.java | 226 + .../mrbind_test/mr/csharp/NameConflicts.java | 242 + .../mr/csharp/NameConflictsExposed.java | 55 + .../mr/csharp/NameConflictsExposed_A.java | 30 + .../mr/csharp/NameConflicts_A.java | 101 + .../mr/csharp/NonCopyableClassByValueOps.java | 103 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 101 + .../mr/csharp/NonTrivialClassOps.java | 124 + .../mr/csharp/NonTrivialDerived.java | 101 + .../src/mrbind_test/mr/csharp/Outer.java | 123 + .../mrbind_test/mr/csharp/Outer_Inner.java | 122 + .../mrbind_test/mr/csharp/RelationalA.java | 194 + .../mrbind_test/mr/csharp/RelationalB.java | 194 + .../mrbind_test/mr/csharp/RelationalC.java | 172 + .../mrbind_test/mr/csharp/RelationalD.java | 194 + .../mrbind_test/mr/csharp/RelationalE.java | 194 + .../mrbind_test/mr/csharp/RelationalF.java | 190 + .../src/mrbind_test/mr/csharp/SA.java | 104 + .../src/mrbind_test/mr/csharp/SB.java | 178 + .../src/mrbind_test/mr/csharp/SC.java | 154 + .../src/mrbind_test/mr/csharp/SD.java | 105 + .../src/mrbind_test/mr/csharp/SE.java | 178 + .../src/mrbind_test/mr/csharp/SF.java | 154 + .../src/mrbind_test/mr/csharp/SG.java | 26 + .../mrbind_test/mr/csharp/StaticOpsEnum.java | 27 + .../mrbind_test/mr/csharp/StaticOpsLhsA.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsB.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsC.java | 77 + .../mrbind_test/mr/csharp/StaticOpsLhsD.java | 77 + .../mrbind_test/mr/csharp/StaticOpsLhsE.java | 103 + .../mrbind_test/mr/csharp/StaticOpsLhsF.java | 103 + .../mrbind_test/mr/csharp/StaticOpsLhsG.java | 102 + .../mrbind_test/mr/csharp/StaticOpsLhsH.java | 103 + .../mr/csharp/StaticOpsMixedLhs.java | 101 + .../mr/csharp/StaticOpsMixedRhs.java | 101 + .../mrbind_test/mr/csharp/StaticOpsRhsA.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsB.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsC.java | 77 + .../mrbind_test/mr/csharp/StaticOpsRhsD.java | 77 + .../mrbind_test/mr/csharp/StaticOpsRhsE.java | 103 + .../mrbind_test/mr/csharp/StaticOpsRhsF.java | 103 + .../mrbind_test/mr/csharp/StaticOpsRhsG.java | 102 + .../mrbind_test/mr/csharp/StaticOpsRhsH.java | 103 + .../mr/csharp/StringConvFsPath.java | 123 + .../mr/csharp/StringConvString.java | 125 + .../mr/csharp/StringConvStringView.java | 124 + .../mrbind_test/mr/csharp/TestConstness.java | 143 + .../src/mrbind_test/mr/csharp/TestFields.java | 507 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 852 ++ .../src/mrbind_test/mr/csharp/TestOpsB.java | 852 ++ .../src/mrbind_test/mr/csharp/TestOpsC.java | 841 ++ .../mr/csharp/TestStdFunction.java | 492 ++ .../src/mrbind_test/mr/csharp/Trivial.java | 101 + .../mrbind_test/mr/csharp/TrivialDerived.java | 101 + .../mrbind_test/mr/customprefnames/Af.java | 101 + .../mrbind_test/mr/customprefnames/Ai.java | 101 + .../mr/customprefnames/Functions.java | 25 + .../src/mrbind_test/mr/declorder/A.java | 75 + .../src/mrbind_test/mr/declorder/A_B.java | 74 + .../src/mrbind_test/mr/declorder/A_E.java | 25 + .../src/mrbind_test/mr/declorder/C_false.java | 52 + .../src/mrbind_test/mr/declorder/C_true.java | 52 + .../mrbind_test/mr/deprecation/Functions.java | 44 + .../A_MR_IncludesForEnumConstants_E_e1.java | 101 + .../mr/includesforenumconstants/E.java | 28 + .../includesforenumconstants/Functions.java | 27 + .../mr/incompletearrayelemtype/E.java | 27 + .../mr/incompletearrayelemtype/Functions.java | 42 + .../src/mrbind_test/mr/iostream/A.java | 101 + .../mrbind_test/mr/iostream/Functions.java | 52 + .../mrbind_test/mr/lifetimeinference/A.java | 212 + .../mrbind_test/mr/lifetimeinference/B.java | 168 + .../mrbind_test/mr/lifetimeinference/C.java | 105 + .../mr/lifetimeinference/Functions.java | 96 + .../src/mrbind_test/mr/matchinglayout/A.java | 96 + .../src/mrbind_test/mr/matchinglayout/B.java | 58 + .../mr/matchinglayout/Functions.java | 91 + .../src/mrbind_test/mr/membervars/A.java | 239 + .../mr/nestedtemplateinst/A_int.java | 101 + .../mr/nestedtemplateinst/A_int_AA_float.java | 102 + .../src/mrbind_test/mr/nestedtypes/A.java | 222 + .../src/mrbind_test/mr/nestedtypes/A_B.java | 101 + .../src/mrbind_test/mr/nestedtypes/A_E.java | 25 + .../mr/omittingtargsandquals/A_float.java | 124 + .../mr/omittingtargsandquals/A_int.java | 146 + .../mr/omittingtargsandquals/Functions.java | 173 + .../src/mrbind_test/mr/overloadedops/A.java | 1102 +++ .../src/mrbind_test/mr/overloadedops/B.java | 102 + .../src/mrbind_test/mr/overloadedops/C.java | 102 + .../src/mrbind_test/mr/overloadedops/D.java | 146 + .../mr/overloadedops/Functions.java | 1051 +++ .../mrbind_test/mr/overloads/Functions.java | 249 + .../src/mrbind_test/mr/phmap/Functions.java | 260 + .../mrbind_test/mr/signaturefilters/A.java | 101 + .../mrbind_test/mr/signaturefilters/Blah.java | 148 + .../mr/signaturefilters/Functions.java | 207 + .../src/mrbind_test/mr/staticfuncs/A.java | 153 + .../src/mrbind_test/mr/stdcontainers/A.java | 102 + .../mr/stdcontainers/Functions.java | 744 ++ .../mr/stdcontainers/NonAssignable.java | 123 + .../NonDefaultConstructible.java | 102 + .../mrbind_test/mr/stdexpected/Functions.java | 230 + .../mr/stdfilesystem/Functions.java | 98 + .../src/mrbind_test/mr/stdfunction/A.java | 173 + .../src/mrbind_test/mr/stdfunction/E.java | 25 + .../mrbind_test/mr/stdfunction/Functions.java | 176 + .../src/mrbind_test/mr/stdoptional/A.java | 168 + .../src/mrbind_test/mr/stdoptional/B.java | 173 + .../src/mrbind_test/mr/stdoptional/E.java | 28 + .../mrbind_test/mr/stdoptional/Functions.java | 392 + .../src/mrbind_test/mr/stdsharedptr/A.java | 102 + .../mr/stdsharedptr/Functions.java | 814 ++ .../mrbind_test/mr/stdstring/Functions.java | 158 + .../mr/stdstringview/Functions.java | 158 + .../mr/stdtuplelike/Functions.java | 231 + .../src/mrbind_test/mr/stduniqueptr/A.java | 102 + .../mr/stduniqueptr/Functions.java | 596 ++ .../mrbind_test/mr/stdvariant/Functions.java | 86 + .../src/mrbind_test/mr/tags/Functions.java | 93 + .../ClassTemplate_uint64_t.java | 207 + .../ClassTemplate_uint64_t_Enum.java | 27 + .../src/mrbind_test/mr/testsimpletypes/E.java | 28 + .../mrbind_test/mr/testsimpletypes/E2.java | 30 + .../mrbind_test/mr/testsimpletypes/E3.java | 27 + .../mrbind_test/mr/testsimpletypes/E4.java | 27 + .../mrbind_test/mr/testsimpletypes/E5.java | 27 + .../mr/testsimpletypes/Functions.java | 860 ++ .../mrbind_test/mr/testsizet/A_uint64_t.java | 123 + .../mrbind_test/mr/testsizet/Functions.java | 124 + .../mr/typedefsintemplates/A_int.java | 125 + .../mr/typedefsintemplates/B_int.java | 101 + .../typedefsintemplates/B_int_BB_float.java | 145 + .../mr/typedefsintemplates/Functions.java | 25 + .../src/mrbind_test/mr/usingdecls/A.java | 265 + .../src/mrbind_test/mr/usingdecls/A_E.java | 25 + .../src/mrbind_test/mr/usingdecls/B.java | 241 + .../phmap/phmap_btree_map_int_float.java | 439 + ...ap_btree_map_int_float_const_iterator.java | 238 + .../phmap_btree_map_int_float_iterator.java | 211 + .../phmap/phmap_btree_multimap_int_float.java | 416 + ...ree_multimap_int_float_const_iterator.java | 238 + ...map_btree_multimap_int_float_iterator.java | 211 + .../phmap/phmap_btree_multiset_int.java | 366 + ...map_btree_multiset_int_const_iterator.java | 164 + .../phmap/phmap_btree_set_int.java | 366 + .../phmap_btree_set_int_const_iterator.java | 164 + .../phmap/phmap_flat_hash_map_int_float.java | 439 + ...lat_hash_map_int_float_const_iterator.java | 217 + ...hmap_flat_hash_map_int_float_iterator.java | 190 + .../phmap/phmap_flat_hash_set_int.java | 366 + ...hmap_flat_hash_set_int_const_iterator.java | 143 + .../phmap/phmap_node_hash_map_int_float.java | 439 + ...ode_hash_map_int_float_const_iterator.java | 217 + ...hmap_node_hash_map_int_float_iterator.java | 190 + .../phmap/phmap_node_hash_set_int.java | 366 + ...hmap_node_hash_set_int_const_iterator.java | 143 + ...hmap_parallel_flat_hash_map_int_float.java | 439 + ...lat_hash_map_int_float_const_iterator.java | 217 + ...llel_flat_hash_map_int_float_iterator.java | 190 + .../phmap_parallel_flat_hash_set_int.java | 366 + ...llel_flat_hash_set_int_const_iterator.java | 143 + ...hmap_parallel_node_hash_map_int_float.java | 439 + ...ode_hash_map_int_float_const_iterator.java | 217 + ...llel_node_hash_map_int_float_iterator.java | 190 + .../phmap_parallel_node_hash_set_int.java | 366 + ...llel_node_hash_set_int_const_iterator.java | 143 + 1977 files changed, 373950 insertions(+) create mode 100644 test/output_java/src/mrbind_test/CppException.java create mode 100644 test/output_java/src/mrbind_test/CppObject.java create mode 100644 test/output_java/src/mrbind_test/CppStruct.java create mode 100644 test/output_java/src/mrbind_test/Ffi.java create mode 100644 test/output_java/src/mrbind_test/Native.java create mode 100644 test/output_java/src/mrbind_test/ffi/A/a.java create mode 100644 test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java create mode 100644 test/output_java/src/mrbind_test/ffi/B/b.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/_1.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_bases.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_csharp.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_iostream.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_overloads.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_phmap.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_function.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_tags.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java create mode 100644 test/output_java/src/mrbind_test/ffi/MR/test_variant.java create mode 100644 test/output_java/src/mrbind_test/ffi/iostream.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_array_int_43.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_deque_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_expected_void_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_filesystem_path.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_void.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_list_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_multiset_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_optional_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_set_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_string_view.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_variant_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_int.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_long.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java create mode 100644 test/output_java/src/mrbind_test/mr/A.java create mode 100644 test/output_java/src/mrbind_test/mr/CommonBaseAB.java create mode 100644 test/output_java/src/mrbind_test/mr/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/SeparateA.java create mode 100644 test/output_java/src/mrbind_test/mr/SeparateB.java create mode 100644 test/output_java/src/mrbind_test/mr/abstractclasses/A.java create mode 100644 test/output_java/src/mrbind_test/mr/abstractclasses/B.java create mode 100644 test/output_java/src/mrbind_test/mr/abstractclasses/C.java create mode 100644 test/output_java/src/mrbind_test/mr/adjustingnames/A.java create mode 100644 test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/A.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/B.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/C.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/D.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/E.java create mode 100644 test/output_java/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/A.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/B.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/B2.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/C.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/D.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/D2.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/D3.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/E.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/F.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/G.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/H.java create mode 100644 test/output_java/src/mrbind_test/mr/bases/I.java create mode 100644 test/output_java/src/mrbind_test/mr/convops/A.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/K.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/L.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java create mode 100644 test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_array_int_43.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_deque_int_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_expected_void_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_filesystem_path.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_void.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_istream.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_list_int_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_optional_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_ostream.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_pair_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_void.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_string_view.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_tuple_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_variant_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_int.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_int_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_long.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_long_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_long_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_iterator.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/A.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/AmbiguousTemplates.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/B.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/C.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/CallOp.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtor.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorExposed.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorTrivial.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvOp.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ConvOpToRef.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/D.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/E.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/E1.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/E2.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/EqualityA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/EqualityB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/EqualityC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/EqualityD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/EqualityE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ExposedLayout.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/F.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/G.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrG.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrH.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IncrDecrI.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IndexerA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IndexerB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IndexerC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableG.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableH.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableI.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableJ.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableK.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NameConflicts_A.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NonTrivialClassOps.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/NonTrivialDerived.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/Outer.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/Outer_Inner.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/RelationalF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/SG.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsEnum.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsG.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsH.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsD.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsE.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsF.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsG.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsH.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StringConvFsPath.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StringConvString.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/StringConvStringView.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestConstness.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestFields.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestOpsC.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/Trivial.java create mode 100644 test/output_java/src/mrbind_test/mr/csharp/TrivialDerived.java create mode 100644 test/output_java/src/mrbind_test/mr/customprefnames/Af.java create mode 100644 test/output_java/src/mrbind_test/mr/customprefnames/Ai.java create mode 100644 test/output_java/src/mrbind_test/mr/customprefnames/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/declorder/A.java create mode 100644 test/output_java/src/mrbind_test/mr/declorder/A_B.java create mode 100644 test/output_java/src/mrbind_test/mr/declorder/A_E.java create mode 100644 test/output_java/src/mrbind_test/mr/declorder/C_false.java create mode 100644 test/output_java/src/mrbind_test/mr/declorder/C_true.java create mode 100644 test/output_java/src/mrbind_test/mr/deprecation/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java create mode 100644 test/output_java/src/mrbind_test/mr/includesforenumconstants/E.java create mode 100644 test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/incompletearrayelemtype/E.java create mode 100644 test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/iostream/A.java create mode 100644 test/output_java/src/mrbind_test/mr/iostream/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/lifetimeinference/A.java create mode 100644 test/output_java/src/mrbind_test/mr/lifetimeinference/B.java create mode 100644 test/output_java/src/mrbind_test/mr/lifetimeinference/C.java create mode 100644 test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/matchinglayout/A.java create mode 100644 test/output_java/src/mrbind_test/mr/matchinglayout/B.java create mode 100644 test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/membervars/A.java create mode 100644 test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int.java create mode 100644 test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java create mode 100644 test/output_java/src/mrbind_test/mr/nestedtypes/A.java create mode 100644 test/output_java/src/mrbind_test/mr/nestedtypes/A_B.java create mode 100644 test/output_java/src/mrbind_test/mr/nestedtypes/A_E.java create mode 100644 test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java create mode 100644 test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java create mode 100644 test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/overloadedops/A.java create mode 100644 test/output_java/src/mrbind_test/mr/overloadedops/B.java create mode 100644 test/output_java/src/mrbind_test/mr/overloadedops/C.java create mode 100644 test/output_java/src/mrbind_test/mr/overloadedops/D.java create mode 100644 test/output_java/src/mrbind_test/mr/overloadedops/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/overloads/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/phmap/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/signaturefilters/A.java create mode 100644 test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java create mode 100644 test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/staticfuncs/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stdcontainers/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdcontainers/NonAssignable.java create mode 100644 test/output_java/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java create mode 100644 test/output_java/src/mrbind_test/mr/stdexpected/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdfunction/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stdfunction/E.java create mode 100644 test/output_java/src/mrbind_test/mr/stdfunction/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdoptional/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stdoptional/B.java create mode 100644 test/output_java/src/mrbind_test/mr/stdoptional/E.java create mode 100644 test/output_java/src/mrbind_test/mr/stdoptional/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdsharedptr/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdstring/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdstringview/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stduniqueptr/A.java create mode 100644 test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/stdvariant/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/tags/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long_Enum.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/E.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/E2.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/E3.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/E4.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/E5.java create mode 100644 test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/testsizet/A_unsigned_long.java create mode 100644 test/output_java/src/mrbind_test/mr/testsizet/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/typedefsintemplates/A_int.java create mode 100644 test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int.java create mode 100644 test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java create mode 100644 test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java create mode 100644 test/output_java/src/mrbind_test/mr/usingdecls/A.java create mode 100644 test/output_java/src/mrbind_test/mr/usingdecls/A_E.java create mode 100644 test/output_java/src/mrbind_test/mr/usingdecls/B.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_set_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java create mode 100644 test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/CppException.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/Native.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_43.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_array_4_array_3_5.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_istream.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_ostream.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E1.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsEnum.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E2.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E3.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E4.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E5.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A_E.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java create mode 100644 test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_43.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_istream.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_ostream.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E1.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsEnum.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E2.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E3.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E4.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E5.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A_E.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java create mode 100644 test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java diff --git a/test/output_java/src/mrbind_test/CppException.java b/test/output_java/src/mrbind_test/CppException.java new file mode 100644 index 00000000..5969c872 --- /dev/null +++ b/test/output_java/src/mrbind_test/CppException.java @@ -0,0 +1,9 @@ +package mrbind_test; + +/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +public class CppException extends RuntimeException +{ + private static final long serialVersionUID = 1; + + public CppException(String message) {super(message);} +} diff --git a/test/output_java/src/mrbind_test/CppObject.java b/test/output_java/src/mrbind_test/CppObject.java new file mode 100644 index 00000000..2909e68e --- /dev/null +++ b/test/output_java/src/mrbind_test/CppObject.java @@ -0,0 +1,90 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * + * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), + * or is a reference to an object owned by something else. References returned by methods keep their owner alive. + */ +public abstract class CppObject implements Native, AutoCloseable +{ + // Runs the destructor from the cleaner. Must not reference the wrapper, or it would never be collected. + private static final class State implements Runnable + { + final java.lang.foreign.MemorySegment ptr; + final java.util.function.Consumer destroy; + volatile boolean owned = true; + + State(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy) + { + this.ptr = ptr; + this.destroy = destroy; + } + + @Override public void run() + { + if (owned) + { + owned = false; + destroy.accept(ptr); + } + } + } + + private final java.lang.foreign.MemorySegment ptr; + private final State state; // Null if not owned. + private final java.lang.ref.Cleaner.Cleanable cleanable; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + private boolean closed; + + /** + * Wraps a pointer from the C bindings. If `destroy` is not null, the object is owned and `destroy` is called on it when the wrapper dies. + * `owner` is kept alive as long as this wrapper is. + */ + @SuppressWarnings("this-escape") + protected CppObject(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy, Object owner) + { + if (ptr.address() == 0) + throw new NullPointerException("The C bindings returned a null pointer."); + this.ptr = ptr; + this.owner = owner; + if (destroy != null) + { + state = new State(ptr, destroy); + cleanable = Ffi.CLEANER.register(this, state); + } + else + { + state = null; + cleanable = null; + } + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() + { + if (closed) + throw new IllegalStateException("This object was closed or moved from."); + return ptr; + } + + /** Does this wrapper own its C++ object? */ + public final boolean isOwned() {return state != null && state.owned;} + + /** Destroys the C++ object now, if owned. The wrapper can't be used after this. Calling it again does nothing. */ + @Override public final void close() + { + closed = true; + if (cleanable != null) + cleanable.clean(); + } + + /** Gives up the ownership of the C++ object and returns its pointer. The caller is responsible for destroying it. The wrapper can't be used after this. */ + public final java.lang.foreign.MemorySegment release() + { + if (!isOwned()) + throw new IllegalStateException("This object is not owned by the wrapper, it can't be moved from."); + state.owned = false; + closed = true; + return ptr; + } +} diff --git a/test/output_java/src/mrbind_test/CppStruct.java b/test/output_java/src/mrbind_test/CppStruct.java new file mode 100644 index 00000000..16a3e7c1 --- /dev/null +++ b/test/output_java/src/mrbind_test/CppStruct.java @@ -0,0 +1,22 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * + * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), + * those returned by reference from the bindings point into memory owned by something else, which they keep alive. + */ +public abstract class CppStruct implements Native +{ + protected final java.lang.foreign.MemorySegment segment; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + + /** Wraps a segment of the exact struct size. `owner` is kept alive as long as this wrapper is. */ + protected CppStruct(java.lang.foreign.MemorySegment segment, Object owner) + { + this.segment = segment; + this.owner = owner; + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() {return segment;} +} diff --git a/test/output_java/src/mrbind_test/Ffi.java b/test/output_java/src/mrbind_test/Ffi.java new file mode 100644 index 00000000..e1088a69 --- /dev/null +++ b/test/output_java/src/mrbind_test/Ffi.java @@ -0,0 +1,258 @@ +package mrbind_test; + +/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +@SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. +public final class Ffi +{ + private Ffi() {} + + public static final java.lang.foreign.Linker LINKER = java.lang.foreign.Linker.nativeLinker(); + public static final java.lang.ref.Cleaner CLEANER = java.lang.ref.Cleaner.create(); + public static final boolean IS_WINDOWS = System.getProperty("os.name", "").toLowerCase(java.util.Locale.ROOT).startsWith("windows"); + + /** The layout of C `long`: 4 bytes on Windows, 8 bytes elsewhere. The name lets `downcall()` widen it to a Java `long`. */ + public static final java.lang.foreign.ValueLayout C_LONG = (IS_WINDOWS ? java.lang.foreign.ValueLayout.JAVA_INT : java.lang.foreign.ValueLayout.JAVA_LONG).withName("mrbind_c_long"); + + /** How an object is passed to a C function. Matches the C enum `MR_C_PassBy`. */ + public static final int PASS_BY_DEFAULT_CONSTRUCT = 0; + public static final int PASS_BY_COPY = 1; + public static final int PASS_BY_MOVE = 2; + public static final int PASS_BY_MOVE_AND_DESTROY = 3; + public static final int PASS_BY_DEFAULT_ARGUMENT = 4; + public static final int PASS_BY_NO_OBJECT = 5; + + // The library of each file group of the C bindings, see `--split-library` in the C generator. + private static final java.util.Map LIB_NAMES = java.util.Map.of("", "bleh"); + private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); + + /** + * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, + * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + */ + public static synchronized java.lang.foreign.SymbolLookup lookup(String group) + { + java.lang.foreign.SymbolLookup ret = LOOKUPS.get(group); + if (ret == null) + { + String lib = LIB_NAMES.get(group); + if (lib == null) + throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } + } + LOOKUPS.put(group, ret); + } + return ret; + } + + /** + * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. + * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. + */ + public static java.lang.invoke.MethodHandle downcall(String group, String name, java.lang.foreign.FunctionDescriptor desc) + { + java.util.Optional symbol = lookup(group).find(name); + java.lang.invoke.MethodHandle handle; + if (symbol.isPresent()) + { + handle = LINKER.downcallHandle(symbol.get(), desc); + } + else + { + java.lang.invoke.MethodType type = desc.toMethodType(); + if (desc.returnLayout().isPresent() && desc.returnLayout().get() instanceof java.lang.foreign.GroupLayout) + type = type.insertParameterTypes(0, java.lang.foreign.SegmentAllocator.class); // Struct returns take an allocator first. + UnsatisfiedLinkError error = new UnsatisfiedLinkError("The function `" + name + "` is missing from the library `" + LIB_NAMES.get(group) + "`."); + handle = java.lang.invoke.MethodHandles.throwException(type.returnType(), UnsatisfiedLinkError.class).bindTo(error); + handle = java.lang.invoke.MethodHandles.dropArguments(handle, 0, type.parameterList()); + } + java.lang.invoke.MethodType type = handle.type(); + boolean changed = false; + if (desc.returnLayout().isPresent() && isCLong(desc.returnLayout().get()) && type.returnType() == int.class) + { + type = type.changeReturnType(long.class); + changed = true; + } + java.util.List args = desc.argumentLayouts(); + int offset = type.parameterCount() - args.size(); // 1 if a `SegmentAllocator` was prepended for a struct return. + for (int i = 0; i < args.size(); i++) + { + if (isCLong(args.get(i)) && type.parameterType(i + offset) == int.class) + { + type = type.changeParameterType(i + offset, long.class); + changed = true; + } + } + if (changed) + handle = java.lang.invoke.MethodHandles.explicitCastArguments(handle, type); + return handle; + } + + private static boolean isCLong(java.lang.foreign.MemoryLayout layout) + { + return layout.name().isPresent() && layout.name().get().equals("mrbind_c_long"); + } + + public static long getCLong(java.lang.foreign.MemorySegment segment, long offset) + { + return IS_WINDOWS ? segment.get(java.lang.foreign.ValueLayout.JAVA_INT, offset) : segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, offset); + } + + public static void setCLong(java.lang.foreign.MemorySegment segment, long offset, long value) + { + if (IS_WINDOWS) + segment.set(java.lang.foreign.ValueLayout.JAVA_INT, offset, (int)value); + else + segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, offset, value); + } + + /** The pointer of a wrapper, or `NULL` for a null wrapper. */ + public static java.lang.foreign.MemorySegment ptr(Native object) + { + return object == null ? java.lang.foreign.MemorySegment.NULL : object.rawPointer(); + } + + /** The pointer of a wrapper. Throws if the wrapper is null. */ + public static java.lang.foreign.MemorySegment ptrNonNull(Native object, String name) + { + if (object == null) + throw new NullPointerException("The parameter `" + name + "` must not be null."); + return object.rawPointer(); + } + + // Allocates a single value, for the parameters passed by pointer. + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfBoolean layout, boolean value) {return allocator.allocate(layout).fill((byte)(value ? 1 : 0));} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfByte layout, byte value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfShort layout, short value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfInt layout, int value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfLong layout, long value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfFloat layout, float value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfDouble layout, double value) {return allocator.allocateFrom(layout, value);} + + /** Allocates the UTF-8 bytes of a string, without a null terminator. Returns `NULL` for null. */ + public static java.lang.foreign.MemorySegment utf8(java.lang.foreign.SegmentAllocator allocator, String str) + { + if (str == null) + return java.lang.foreign.MemorySegment.NULL; + byte[] bytes = str.getBytes(java.nio.charset.StandardCharsets.UTF_8); + return allocator.allocateFrom(java.lang.foreign.ValueLayout.JAVA_BYTE, bytes); + } + + /** The end pointer of a segment allocated by `utf8()`. `NULL` for `NULL`. */ + public static java.lang.foreign.MemorySegment end(java.lang.foreign.MemorySegment segment) + { + return segment.address() == 0 ? java.lang.foreign.MemorySegment.NULL : segment.asSlice(segment.byteSize()); + } + + /** Decodes a UTF-8 string from `size` bytes at `data`. */ + public static String string(java.lang.foreign.MemorySegment data, long size) + { + if (size == 0) + return ""; + return new String(data.reinterpret(size).toArray(java.lang.foreign.ValueLayout.JAVA_BYTE), java.nio.charset.StandardCharsets.UTF_8); + } + + /** Builds a struct layout with the C alignment rules: each field is aligned naturally, and the struct is padded to its alignment. */ + public static java.lang.foreign.StructLayout structLayout(String[] names, java.lang.foreign.MemoryLayout[] fields) + { + java.util.List elems = new java.util.ArrayList<>(); + long offset = 0, align = 1; + for (int i = 0; i < fields.length; i++) + { + long a = fields[i].byteAlignment(); + long pad = (a - offset % a) % a; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + elems.add(fields[i].withName(names[i])); + offset += pad + fields[i].byteSize(); + align = Math.max(align, a); + } + long pad = (align - offset % align) % align; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + if (elems.isEmpty()) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(1)); // Empty C++ structs have the size 1. + return java.lang.foreign.MemoryLayout.structLayout(elems.toArray(new java.lang.foreign.MemoryLayout[0])); + } + + /** Checks a struct layout against the size and alignment the C bindings were generated with. */ + public static void checkLayout(java.lang.foreign.StructLayout layout, long size, long alignment, String name) + { + if (layout.byteSize() != size || layout.byteAlignment() != alignment) + throw new IllegalStateException("The Java layout of `" + name + "` (" + layout.byteSize() + " bytes, aligned to " + layout.byteAlignment() + ") doesn't match C++ (" + size + " bytes, aligned to " + alignment + ")."); + } + + /** Allocates zeroed memory for a struct. It's freed when the segment becomes unreachable. */ + public static java.lang.foreign.MemorySegment allocStruct(java.lang.foreign.MemoryLayout layout) + { + return java.lang.foreign.Arena.ofAuto().allocate(layout); + } + + /** Converts a `Throwable` from `invokeExact()` to something that can be thrown from a method without a `throws` clause. */ + public static RuntimeException rethrow(Throwable e) + { + if (e instanceof RuntimeException r) + return r; + if (e instanceof Error err) + throw err; + return new RuntimeException(e); + } + + // C++ exceptions are reported by the C bindings through a callback, which stores the message here until the wrapper checks it. + private static final ThreadLocal PENDING_EXCEPTION = new ThreadLocal<>(); + + private static void exceptionHandler(java.lang.foreign.MemorySegment messages, java.lang.foreign.MemorySegment typeNames, java.lang.foreign.MemorySegment userdata) + { + StringBuilder text = new StringBuilder(); + java.lang.foreign.MemorySegment array = messages.reinterpret(Long.MAX_VALUE); + for (long i = 0;; i++) + { + java.lang.foreign.MemorySegment message = array.getAtIndex(java.lang.foreign.ValueLayout.ADDRESS, i); + if (message.address() == 0) + break; + if (i > 0) + text.append('\n'); + text.append(message.reinterpret(Long.MAX_VALUE).getString(0)); + } + PENDING_EXCEPTION.set(text.toString()); + } + + static + { + try + { + java.lang.invoke.MethodHandle handler = java.lang.invoke.MethodHandles.lookup().findStatic(Ffi.class, "exceptionHandler", java.lang.invoke.MethodType.methodType(void.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class)); + java.lang.foreign.MemorySegment stub = LINKER.upcallStub(handler, java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS), java.lang.foreign.Arena.global()); + downcall("", "MR_C_SetExceptionHandler", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)).invokeExact(stub, java.lang.foreign.MemorySegment.NULL); + } + catch (Throwable e) + { + throw new ExceptionInInitializerError(e); + } + } + + /** Throws if the last call into the C bindings threw a C++ exception. */ + public static void checkException() + { + String message = PENDING_EXCEPTION.get(); + if (message != null) + { + PENDING_EXCEPTION.remove(); + throw new CppException(message); + } + } +} diff --git a/test/output_java/src/mrbind_test/Native.java b/test/output_java/src/mrbind_test/Native.java new file mode 100644 index 00000000..f9d8474e --- /dev/null +++ b/test/output_java/src/mrbind_test/Native.java @@ -0,0 +1,8 @@ +package mrbind_test; + +/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +public interface Native +{ + /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ + java.lang.foreign.MemorySegment rawPointer(); +} diff --git a/test/output_java/src/mrbind_test/ffi/A/a.java b/test/output_java/src/mrbind_test/ffi/A/a.java new file mode 100644 index 00000000..956d4f2f --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +public final class a +{ + private a() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecA = mrbind_test.Ffi.downcall("", "MR_GetSeparateVecA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java new file mode 100644 index 00000000..053d5b1a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.AB_base; + +/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +public final class ab_base +{ + private ab_base() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_mark_shared_common_base_ab = mrbind_test.Ffi.downcall("", "MR_mark_shared_common_base_ab", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/B/b.java b/test/output_java/src/mrbind_test/ffi/B/b.java new file mode 100644 index 00000000..412f8e87 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +public final class b +{ + private b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecB = mrbind_test.Ffi.downcall("", "MR_GetSeparateVecB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/_1.java b/test/output_java/src/mrbind_test/ffi/MR/_1.java new file mode 100644 index 00000000..0b883a82 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/_1.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +public final class _1 +{ + private _1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_foo = mrbind_test.Ffi.downcall("", "MR_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_bar = mrbind_test.Ffi.downcall("", "MR_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Get_x = mrbind_test.Ffi.downcall("", "MR_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Set_x = mrbind_test.Ffi.downcall("", "MR_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java new file mode 100644 index 00000000..a9e022e4 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +public final class test_abstract_classes +{ + private test_abstract_classes() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_A_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java new file mode 100644 index 00000000..ce43ae56 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +public final class test_adjusting_names +{ + private test_adjusting_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConvertTo_unsigned_long = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConvertTo_unsigned_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Get_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Get_var_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_GetMutable_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_GetMutable_var_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Set_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Set_var_unsigned_long", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Destroy = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java new file mode 100644 index 00000000..33cc0d87 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java @@ -0,0 +1,126 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +public final class test_aggregates +{ + private test_aggregates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_y", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_j", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java new file mode 100644 index 00000000..e61dea09 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types +{ + private test_arrays_of_incomplete_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_foo = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java new file mode 100644 index 00000000..c992d055 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types_2 +{ + private test_arrays_of_incomplete_types_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_bar = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java/src/mrbind_test/ffi/MR/test_bases.java new file mode 100644 index 00000000..6d464b87 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +public final class test_bases +{ + private test_bases() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Bases_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D3_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D3_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java new file mode 100644 index 00000000..9e52d501 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +public final class test_combined_a_b +{ + private test_combined_a_b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetCombinedVecAB = mrbind_test.Ffi.downcall("", "MR_GetCombinedVecAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java new file mode 100644 index 00000000..ede36e45 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +public final class test_conv_ops +{ + private test_conv_ops() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConvertTo_bool = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConvertTo_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java new file mode 100644 index 00000000..f56a456d --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,165 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +public final class test_copy_inherited_members +{ + private test_copy_inherited_members() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java new file mode 100644 index 00000000..e8f62dd4 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1346 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +public final class test_csharp +{ + private test_csharp() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_bool_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_print_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_print_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_str = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_str", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_keyword_in_param_name = mrbind_test.Ffi.downcall("", "MR_CSharp_test_keyword_in_param_name", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_se_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_se_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_sg_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_sg_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsA_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsB_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsB_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsC_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsC_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsD_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsD_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsE_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsE_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsF_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsF_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsG_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsG_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsH_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsH_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsA = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsB = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsB", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsC = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsD = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsE = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsF = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsG = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsH = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsEnum_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsEnum_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_float = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_add_float_MR_CSharp_NonTrivialClassOps = mrbind_test.Ffi.downcall("", "MR_C_add_float_MR_CSharp_NonTrivialClassOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_sub_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_div_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_mod_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_vec = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_vec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_asave_ref_in_exposed_layout = mrbind_test.Ffi.downcall("", "MR_CSharp_asave_ref_in_exposed_layout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_sub_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_div_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_mod_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_make_exposed_sh = mrbind_test.Ffi.downcall("", "MR_CSharp_make_exposed_sh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_with_repeated_types = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_with_repeated_types", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H1 + { + private H1() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflicts", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflictsExposed = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflictsExposed", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_int = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_int = mrbind_test.Ffi.downcall("", "MR_CSharp_end_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_mut_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_mut_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_const_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_const_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple0 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple1 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_pair2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_pair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_const = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_const", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_crefs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_crefs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_value = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_lvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_lvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_A_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ci = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ci", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cs = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_B_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + } + + public static final class H2 + { + private H2() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_C_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_0", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_3 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int = mrbind_test.Ffi.downcall("", "MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_short = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_short", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorExposed_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorExposed_Construct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ConvCtorExposed.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_float_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityA_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityB_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityB_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityC_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityC_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityD_const_int_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityD_const_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayout_ref_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayout_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayout_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayout_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_const_MR_CSharp_ExposedLayout_ref_int = mrbind_test.Ffi.downcall("", "MR_C_add_const_MR_CSharp_ExposedLayout_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayout_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayout_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_2", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H3 + { + private H3() {} + + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_F_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_G_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref_static = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref_static", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_this_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_this_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_name_Conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_name_Conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_name_conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflictsExposed_name_Conflicts_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflictsExposed_name_Conflicts_exposed", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConvertTo_std_string = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConvertTo_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConvertTo_std_string_view = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConvertTo_std_string_view", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo_mut", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_sub_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mul_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_div_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mod_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_xor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitand_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_lshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_rshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow_star", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_index", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f4", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f5", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f6", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f7", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java new file mode 100644 index 00000000..46bfd0e7 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +public final class test_custom_preferred_names +{ + private test_custom_preferred_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_blah = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java new file mode 100644 index 00000000..2d1c9ac2 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +public final class test_declaration_order +{ + private test_declaration_order() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_c = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_c", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A_B.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_d = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_a = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_a", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_b = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_false_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_false_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_true.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_true_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_true_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_false.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java new file mode 100644 index 00000000..d7791105 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java @@ -0,0 +1,15 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +public final class test_deprecation +{ + private test_deprecation() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Deprecation_foo = mrbind_test.Ffi.downcall("", "MR_Deprecation_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Deprecation_bar = mrbind_test.Ffi.downcall("", "MR_Deprecation_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java new file mode 100644 index 00000000..6d1a532d --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants +{ + private test_includes_for_enum_constants() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_foo = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java new file mode 100644 index 00000000..6d263071 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_2 +{ + private test_includes_for_enum_constants_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java new file mode 100644 index 00000000..4dc1659c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_3 +{ + private test_includes_for_enum_constants_3() {} +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java new file mode 100644 index 00000000..14b90d68 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +public final class test_iostream +{ + private test_iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_print_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_print_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_input_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_input_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IOStream_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_Destroy = mrbind_test.Ffi.downcall("", "MR_IOStream_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java new file mode 100644 index 00000000..72709289 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -0,0 +1,39 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +public final class test_lifetime_inference +{ + private test_lifetime_inference() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_begin = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_end = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Construct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java new file mode 100644 index 00000000..e9fb1312 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +public final class test_matching_layout +{ + private test_matching_layout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_foo = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_foo", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bar = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_baz = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bleh = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bleh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java new file mode 100644 index 00000000..480d22f7 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +public final class test_member_vars +{ + private test_member_vars() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_z", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_w = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_w", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_y = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_ref = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Destroy = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java new file mode 100644 index 00000000..d101f32e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -0,0 +1,34 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +public final class test_mention_blacklists +{ + private test_mention_blacklists() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Get_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Set_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java new file mode 100644 index 00000000..b63d70c3 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +public final class test_nested_class_template_inst +{ + private test_nested_class_template_inst() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java new file mode 100644 index 00000000..151f301e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java @@ -0,0 +1,28 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +public final class test_nested_types +{ + private test_nested_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java new file mode 100644 index 00000000..528901a3 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +public final class test_omitting_template_args_and_quals +{ + private test_omitting_template_args_and_quals() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_b = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_c = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_d = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_inst = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_inst", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java new file mode 100644 index 00000000..5a68a556 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -0,0 +1,117 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +public final class test_overloaded_operators +{ + private test_overloaded_operators() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_arrow_star_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_arrow_star_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_add_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_sub_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mul_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_div_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mod_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_xor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitand_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_lshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_rshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow_star = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_call = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_index = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java new file mode 100644 index 00000000..9dfcbd14 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +public final class test_overloads +{ + private test_overloads() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Overloads_a_1 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_a_2 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_int = mrbind_test.Ffi.downcall("", "MR_Overloads_b_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_float = mrbind_test.Ffi.downcall("", "MR_Overloads_b_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_int = mrbind_test.Ffi.downcall("", "MR_Overloads_c_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_float = mrbind_test.Ffi.downcall("", "MR_Overloads_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_int = mrbind_test.Ffi.downcall("", "MR_Overloads_d_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_float = mrbind_test.Ffi.downcall("", "MR_Overloads_d_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_const_int_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_e_const_int_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int_rvalue_ref_int = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int_rvalue_ref_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int_rvalue_ref_float = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int_rvalue_ref_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_float = mrbind_test.Ffi.downcall("", "MR_Overloads_f_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_const_int_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_const_int_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java new file mode 100644 index 00000000..03f57869 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +public final class test_phmap +{ + private test_phmap() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multiset_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multiset_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multimap_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multimap_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java new file mode 100644 index 00000000..98f1a938 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java @@ -0,0 +1,73 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +public final class test_simple_types +{ + private test_simple_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetConstVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_SHORT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Def = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2RefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2RefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckCharMaybeUnsigned = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckCharMaybeUnsigned", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_unsigned_char_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_unsigned_char_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_signed_char_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_signed_char_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_LongLong = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_LongLong", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_unsigned_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_unsigned_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_unsigned_long", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_Get_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_Get_var_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_GetMutable_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_GetMutable_var_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_Set_var_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_Set_var_unsigned_long", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_unsigned_long_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_unsigned_long_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java new file mode 100644 index 00000000..02b41e86 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +public final class test_size_t_ptrdiff_t +{ + private test_size_t_ptrdiff_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_unsigned_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_unsigned_long_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_unsigned_long_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_unsigned_long = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_unsigned_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_long = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_long", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_long_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_long_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_long = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_long", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_unsigned_long_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_unsigned_long_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_unsigned_long_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_unsigned_long_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_unsigned_long_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_unsigned_long_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_unsigned_long_foo = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_unsigned_long_foo", java.lang.foreign.FunctionDescriptor.of(mrbind_test.Ffi.C_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_unsigned_long_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_unsigned_long_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java new file mode 100644 index 00000000..f1670f9a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +public final class test_static_memberr +{ + private test_static_memberr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_blah = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java new file mode 100644 index 00000000..cb43f85e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java @@ -0,0 +1,65 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +public final class test_std_containers +{ + private test_std_containers() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdContainers_Set = mrbind_test.Ffi.downcall("", "MR_StdContainers_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdContainers_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_Get = mrbind_test.Ffi.downcall("", "MR_StdContainers_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDeque = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDeque", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetList = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetList", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArray", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArraySimple = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArraySimple", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimpleParam = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimpleParam", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.cs.std_array_int_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimplePtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimplePtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetWithMergedIters = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetWithMergedIters", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIter = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIterConst = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIterConst", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefCon = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefCon", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetVectorNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetVectorNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDequeNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDequeNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetListNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetListNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayOfPlainArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayOfPlainArray", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int_array_4_array_3_5.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_less_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Construct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java new file mode 100644 index 00000000..91102810 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +public final class test_std_expected +{ + private test_std_expected() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExp", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVoid", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoid", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVec = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java new file mode 100644 index 00000000..a1136b31 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +public final class test_std_filesystem +{ + private test_std_filesystem() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_GetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_GetPath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPath", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathConstRef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java new file mode 100644 index 00000000..0e68fdf2 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +public final class test_std_function +{ + private test_std_function() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_int_int = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_int_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int_func_from_int_int = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int_func_from_int_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_std_string_func_from_int_float = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_std_string_func_from_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_std_string = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_A_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_A_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Get_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Set_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java new file mode 100644 index 00000000..7350f68b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java @@ -0,0 +1,49 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +public final class test_std_optional +{ + private test_std_optional() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2ConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2Def = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Get_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Set_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java new file mode 100644 index 00000000..1f445355 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -0,0 +1,57 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_shared_ptr +{ + private test_std_shared_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java new file mode 100644 index 00000000..f18d09b9 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +public final class test_std_string +{ + private test_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdString_Set = mrbind_test.Ffi.downcall("", "MR_StdString_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdString_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_Get = mrbind_test.Ffi.downcall("", "MR_StdString_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java new file mode 100644 index 00000000..6f7e95cb --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +public final class test_std_string_view +{ + private test_std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdStringView_Set = mrbind_test.Ffi.downcall("", "MR_StdStringView_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdStringView_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_Get = mrbind_test.Ffi.downcall("", "MR_StdStringView_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java new file mode 100644 index 00000000..37f0e2c3 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +public final class test_std_tuple_like +{ + private test_std_tuple_like() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetPair", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair3 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair4 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair5 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair6 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetTuple", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple7 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple8 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple8", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java new file mode 100644 index 00000000..582bbab5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_unique_ptr +{ + private test_std_unique_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetFloat", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloat", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloatDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloatDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java/src/mrbind_test/ffi/MR/test_tags.java new file mode 100644 index 00000000..b19273f1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_tags.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +public final class test_tags +{ + private test_tags() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_int = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_int = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_0 = mrbind_test.Ffi.downcall("", "MR_Tags_foo_0", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java new file mode 100644 index 00000000..49fda92e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +public final class test_typedefs_in_templates +{ + private test_typedefs_in_templates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_bar = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_foo2 = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_foo2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java new file mode 100644 index 00000000..615be225 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,40 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +public final class test_using_decls +{ + private test_using_decls() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Construct = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_assign = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Method = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_assign = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Method = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_StaticFunc = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Get_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Get_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Get_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java/src/mrbind_test/ffi/MR/test_variant.java new file mode 100644 index 00000000..3c3aae29 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/MR/test_variant.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +public final class test_variant +{ + private test_variant() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdVariant_foo = mrbind_test.Ffi.downcall("", "MR_StdVariant_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_bar = mrbind_test.Ffi.downcall("", "MR_StdVariant_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_baz = mrbind_test.Ffi.downcall("", "MR_StdVariant_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_blah = mrbind_test.Ffi.downcall("", "MR_StdVariant_blah", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/iostream.java b/test/output_java/src/mrbind_test/ffi/iostream.java new file mode 100644 index 00000000..1af4cd30 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/iostream.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +public final class iostream +{ + private iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_GetStdCout = mrbind_test.Ffi.downcall("", "MR_C_GetStdCout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCerr = mrbind_test.Ffi.downcall("", "MR_C_GetStdCerr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdClog = mrbind_test.Ffi.downcall("", "MR_C_GetStdClog", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCin = mrbind_test.Ffi.downcall("", "MR_C_GetStdCin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java new file mode 100644 index 00000000..7a31ffe6 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_map_int_float +{ + private phmap_btree_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java new file mode 100644 index 00000000..baa503ea --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multimap_int_float +{ + private phmap_btree_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java new file mode 100644 index 00000000..75986dae --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multiset_int +{ + private phmap_btree_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java new file mode 100644 index 00000000..5baf0fe1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_btree_set_int +{ + private phmap_btree_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java new file mode 100644 index 00000000..5749e1a5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_map_int_float +{ + private phmap_flat_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java new file mode 100644 index 00000000..6d89a195 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_set_int +{ + private phmap_flat_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java new file mode 100644 index 00000000..f1cd0c37 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_map_int_float +{ + private phmap_node_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java new file mode 100644 index 00000000..df37c4b0 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_set_int +{ + private phmap_node_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java new file mode 100644 index 00000000..b33d014d --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_map_int_float +{ + private phmap_parallel_flat_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java new file mode 100644 index 00000000..fb82294c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_set_int +{ + private phmap_parallel_flat_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java new file mode 100644 index 00000000..591d728e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_map_int_float +{ + private phmap_parallel_node_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java new file mode 100644 index 00000000..408c9d3b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_set_int +{ + private phmap_parallel_node_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..5cc3ac9a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_A_42 +{ + private std_array_MR_StdContainers_A_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..db4ef900 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,23 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_NonAssignable_42 +{ + private std_array_MR_StdContainers_NonAssignable_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_int_43.java b/test/output_java/src/mrbind_test/ffi/std_array_int_43.java new file mode 100644 index 00000000..3706ce9b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_array_int_43.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int_43`. Generated by mrbind, do not edit. */ +public final class std_array_int_43 +{ + private std_array_int_43() {} +} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java b/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java new file mode 100644 index 00000000..0fc9823b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. Generated by mrbind, do not edit. */ +public final class std_array_int_array_4_array_3_5 +{ + private std_array_int_array_4_array_3_5() {} +} diff --git a/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..5311eb69 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,62 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_deque_MR_StdContainers_NonAssignable +{ + private std_deque_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_deque_int.java b/test/output_java/src/mrbind_test/ffi/std_deque_int.java new file mode 100644 index 00000000..ecc84603 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_deque_int.java @@ -0,0 +1,71 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_int`. Generated by mrbind, do not edit. */ +public final class std_deque_int +{ + private std_deque_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..6ddf0f45 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_E1_float +{ + private std_expected_MR_CSharp_E1_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..b2cc94ec --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_ExposedLayoutSh_float +{ + private std_expected_MR_CSharp_ExposedLayoutSh_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..6c783919 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_ExposedLayout_float +{ + private std_expected_MR_CSharp_ExposedLayout_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..6999846a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_NonTrivial_float +{ + private std_expected_MR_CSharp_NonTrivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..4e81dd0c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_SA_float +{ + private std_expected_MR_CSharp_SA_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..1bf16ecc --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_Trivial_float +{ + private std_expected_MR_CSharp_Trivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java new file mode 100644 index 00000000..92511daf --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_int_float`. Generated by mrbind, do not edit. */ +public final class std_expected_int_float +{ + private std_expected_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java new file mode 100644 index 00000000..c090621f --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_expected_int_std_string +{ + private std_expected_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java new file mode 100644 index 00000000..14680621 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_void_float`. Generated by mrbind, do not edit. */ +public final class std_expected_void_float +{ + private std_expected_void_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java new file mode 100644 index 00000000..8c29e384 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +public final class std_filesystem_path +{ + private std_filesystem_path() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_string = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..bba6c24a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 +{ + private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..0ff77b94 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC +{ + private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..e64172e5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_A +{ + private std_function_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java new file mode 100644 index 00000000..c1e4eb48 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E +{ + private std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int.java b/test/output_java/src/mrbind_test/ffi/std_function_int.java new file mode 100644 index 00000000..79b0745d --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int`. Generated by mrbind, do not edit. */ +public final class std_function_int +{ + private std_function_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java new file mode 100644 index 00000000..1e6eb1a5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_int_from_int_int +{ + private std_function_int_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java b/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java new file mode 100644 index 00000000..607bff92 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_int_from_std_string +{ + private std_function_int_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java new file mode 100644 index 00000000..d62144de --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int_ref_from_int_ref_int_rvalue_ref +{ + private std_function_int_ref_from_int_ref_int_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java new file mode 100644 index 00000000..cc8574a7 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int_rvalue_ref +{ + private std_function_int_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java new file mode 100644 index 00000000..4a5fc957 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int_float +{ + private std_function_std_string_from_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java new file mode 100644 index 00000000..a2a98cdc --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int_int +{ + private std_function_std_string_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void.java b/test/output_java/src/mrbind_test/ffi/std_function_void.java new file mode 100644 index 00000000..ebfa3a4f --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +public final class std_function_void +{ + private std_function_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..2e84d3df --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_MR_StdFunction_A +{ + private std_function_void_from_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java new file mode 100644 index 00000000..b3b475de --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_int_int +{ + private std_function_void_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java new file mode 100644 index 00000000..f461d793 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_std_string +{ + private std_function_void_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..68c6eaea --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,59 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_list_MR_StdContainers_NonAssignable +{ + private std_list_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_list_int.java b/test/output_java/src/mrbind_test/ffi/std_list_int.java new file mode 100644 index 00000000..78865bfd --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_list_int.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_int`. Generated by mrbind, do not edit. */ +public final class std_list_int +{ + private std_list_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..5621fc6f --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_map_MR_StdContainers_NonAssignable_float +{ + private std_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_map_int_float.java b/test/output_java/src/mrbind_test/ffi/std_map_int_float.java new file mode 100644 index 00000000..1654ccdc --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_map_int_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_int_float`. Generated by mrbind, do not edit. */ +public final class std_map_int_float +{ + private std_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..722ad6f8 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_MR_StdContainers_NonAssignable_float +{ + private std_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java new file mode 100644 index 00000000..355b2582 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_int_float +{ + private std_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..1a02113a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_multiset_MR_StdContainers_NonAssignable +{ + private std_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java/src/mrbind_test/ffi/std_multiset_float.java new file mode 100644 index 00000000..386a415d --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +public final class std_multiset_float +{ + private std_multiset_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_int.java b/test/output_java/src/mrbind_test/ffi/std_multiset_int.java new file mode 100644 index 00000000..5e0f7360 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_int`. Generated by mrbind, do not edit. */ +public final class std_multiset_int +{ + private std_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..2e391f50 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_ExposedLayoutSh +{ + private std_optional_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..10bee38b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_NonTrivial +{ + private std_optional_MR_CSharp_NonTrivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..13ff2ba8 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_SA +{ + private std_optional_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..cde44112 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_Trivial +{ + private std_optional_MR_CSharp_Trivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..41f59d25 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_A +{ + private std_optional_MR_StdOptional_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..f091760c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_B +{ + private std_optional_MR_StdOptional_B() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..26c2b8ea --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_E +{ + private std_optional_MR_StdOptional_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_int.java b/test/output_java/src/mrbind_test/ffi/std_optional_int.java new file mode 100644 index 00000000..f64b40a1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_int`. Generated by mrbind, do not edit. */ +public final class std_optional_int +{ + private std_optional_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java new file mode 100644 index 00000000..7420f29f --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +public final class std_optional_std_string +{ + private std_optional_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..99ce3870 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_pair_MR_SeparateA_MR_SeparateB +{ + private std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..88f72999 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_MR_StdContainers_NonAssignable_float +{ + private std_pair_const_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java new file mode 100644 index 00000000..34eea1e7 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_float +{ + private std_pair_const_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java new file mode 100644 index 00000000..0db03228 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_ref_const_float_ref +{ + private std_pair_const_int_ref_const_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..c5c1d6eb --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref +{ + private std_pair_const_int_rvalue_ref_const_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java new file mode 100644 index 00000000..baf401b2 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_float`. Generated by mrbind, do not edit. */ +public final class std_pair_int_float +{ + private std_pair_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java new file mode 100644 index 00000000..b31e0d02 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int_ref_float_ref +{ + private std_pair_int_ref_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..ad8b8edf --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int_rvalue_ref_float_rvalue_ref +{ + private std_pair_int_rvalue_ref_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java new file mode 100644 index 00000000..5c6bdcdf --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_pair_int_std_string +{ + private std_pair_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..57a1ce96 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_set_MR_StdContainers_NonAssignable +{ + private std_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_float.java b/test/output_java/src/mrbind_test/ffi/std_set_float.java new file mode 100644 index 00000000..47712d97 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_set_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +public final class std_set_float +{ + private std_set_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_int.java b/test/output_java/src/mrbind_test/ffi/std_set_int.java new file mode 100644 index 00000000..d43ec702 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_set_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_int`. Generated by mrbind, do not edit. */ +public final class std_set_int +{ + private std_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..aae58f97 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh +{ + private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..c17dc3ec --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SA +{ + private std_shared_ptr_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..5dcf8ce6 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SE +{ + private std_shared_ptr_MR_CSharp_SE() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..00f8de85 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SG +{ + private std_shared_ptr_MR_CSharp_SG() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..a1b6747e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CommonBaseAB +{ + private std_shared_ptr_MR_CommonBaseAB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..d476159b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A +{ + private std_shared_ptr_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..8ddc8375 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..33a54a0a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..cf59e707 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_CSharp_SA +{ + private std_shared_ptr_const_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..3709e4fe --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A +{ + private std_shared_ptr_const_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..7fdac6d8 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..6326b139 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java new file mode 100644 index 00000000..5bcd37f5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int +{ + private std_shared_ptr_const_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java new file mode 100644 index 00000000..64626f17 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int_array +{ + private std_shared_ptr_const_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java new file mode 100644 index 00000000..b9725acd --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int_array_42 +{ + private std_shared_ptr_const_int_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java new file mode 100644 index 00000000..7aa5bde9 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_void +{ + private std_shared_ptr_const_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java new file mode 100644 index 00000000..49f4c1f5 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int +{ + private std_shared_ptr_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java new file mode 100644 index 00000000..826444ba --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int_array +{ + private std_shared_ptr_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java new file mode 100644 index 00000000..1591a556 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int_array_42 +{ + private std_shared_ptr_int_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java new file mode 100644 index 00000000..e4de6a56 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_void +{ + private std_shared_ptr_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_string.java b/test/output_java/src/mrbind_test/ffi/std_string.java new file mode 100644 index 00000000..4e0bdf26 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_string.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +public final class std_string +{ + private std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_string_view.java b/test/output_java/src/mrbind_test/ffi/std_string_view.java new file mode 100644 index 00000000..00e81830 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_string_view.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +public final class std_string_view +{ + private std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple.java b/test/output_java/src/mrbind_test/ffi/std_tuple.java new file mode 100644 index 00000000..8cbe446e --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +public final class std_tuple +{ + private std_tuple() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8133ed79 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout +{ + private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..b4af3042 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..4014137c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java new file mode 100644 index 00000000..c9d6cd51 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd +{ + private std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java new file mode 100644 index 00000000..2570ee74 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref +{ + private std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java new file mode 100644 index 00000000..c6fd9ca9 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_std_string +{ + private std_tuple_const_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_const_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_const_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java b/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java new file mode 100644 index 00000000..101e096b --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. Generated by mrbind, do not edit. */ +public final class std_tuple_float_double_int_int +{ + private std_tuple_float_double_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_double = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_double", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_double_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_double_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_2 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_3 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int.java new file mode 100644 index 00000000..cf2a96b2 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int`. Generated by mrbind, do not edit. */ +public final class std_tuple_int +{ + private std_tuple_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java new file mode 100644 index 00000000..ff640e11 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_float`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_float +{ + private std_tuple_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..cfe25e86 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref +{ + private std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java new file mode 100644 index 00000000..230f58d7 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_std_string +{ + private std_tuple_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..5b7a55ab --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A +{ + private std_unique_ptr_MR_StdUniquePtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..86f55711 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A_array +{ + private std_unique_ptr_MR_StdUniquePtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java new file mode 100644 index 00000000..8faaa5e3 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int +{ + private std_unique_ptr_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java new file mode 100644 index 00000000..923576b1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int_array +{ + private std_unique_ptr_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..4b9cd7ac --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_MR_StdContainers_NonAssignable_float +{ + private std_unordered_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java new file mode 100644 index 00000000..489ca3d2 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_int_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_int_float +{ + private std_unordered_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..805d3ea0 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float +{ + private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java new file mode 100644 index 00000000..6a18e1d0 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_int_float +{ + private std_unordered_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..c33c45fd --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_MR_StdContainers_NonAssignable +{ + private std_unordered_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java new file mode 100644 index 00000000..cdd37291 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_int`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_int +{ + private std_unordered_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..b6f73a1c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_MR_StdContainers_NonAssignable +{ + private std_unordered_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java b/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java new file mode 100644 index 00000000..e6f1889c --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_int`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_int +{ + private std_unordered_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java new file mode 100644 index 00000000..aa5dac23 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float +{ + private std_variant_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java new file mode 100644 index 00000000..b81afbd9 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float_float +{ + private std_variant_int_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_float_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_1_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_1_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java new file mode 100644 index 00000000..9c223896 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float_std_string +{ + private std_variant_int_float_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java new file mode 100644 index 00000000..172250fe --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int_float +{ + private std_variant_std_monostate_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java new file mode 100644 index 00000000..c34cf2ca --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int_float_float +{ + private std_variant_std_monostate_int_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java new file mode 100644 index 00000000..a4e51525 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_A +{ + private std_vector_MR_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f79d0158 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_A_ptr +{ + private std_vector_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..7bd0bb53 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_ExposedLayout +{ + private std_vector_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..8c974d0a --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateA +{ + private std_vector_MR_SeparateA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateA_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..0fd0a933 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateB +{ + private std_vector_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..d347fddd --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,63 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonAssignable +{ + private std_vector_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..529230bb --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonDefaultConstructible +{ + private std_vector_MR_StdContainers_NonDefaultConstructible() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f8a752ed --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_const_MR_CSharp_A_ptr +{ + private std_vector_const_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_int.java b/test/output_java/src/mrbind_test/ffi/std_vector_int.java new file mode 100644 index 00000000..71acac26 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_int.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_int`. Generated by mrbind, do not edit. */ +public final class std_vector_int +{ + private std_vector_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_long.java b/test/output_java/src/mrbind_test/ffi/std_vector_long.java new file mode 100644 index 00000000..321a8eb1 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_long.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_long`. Generated by mrbind, do not edit. */ +public final class std_vector_long +{ + private std_vector_long() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_long_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_long_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_long_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_long_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_long_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_long_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_long_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_long_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_long_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_long_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java new file mode 100644 index 00000000..6d671f05 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_vector_std_expected_int_std_string +{ + private std_vector_std_expected_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..6cf68579 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB +{ + private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java b/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java new file mode 100644 index 00000000..7008ae34 --- /dev/null +++ b/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_unsigned_long`. Generated by mrbind, do not edit. */ +public final class std_vector_unsigned_long +{ + private std_vector_unsigned_long() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_unsigned_long_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_unsigned_long_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_unsigned_long_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_unsigned_long_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_unsigned_long_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_unsigned_long_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_unsigned_long_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_unsigned_long_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.Ffi.C_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_unsigned_long_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_unsigned_long_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java/src/mrbind_test/mr/A.java b/test/output_java/src/mrbind_test/mr/A.java new file mode 100644 index 00000000..b29c79c7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/A.java @@ -0,0 +1,152 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_A_AssignFromAnother()`. + */ + public mrbind_test.mr.A assignFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_A_Get_x()`. + */ + public mrbind_test.mr.cs.std_string x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_A_Set_x()`. + */ + public void setX(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/CommonBaseAB.java b/test/output_java/src/mrbind_test/mr/CommonBaseAB.java new file mode 100644 index 00000000..651602c6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/CommonBaseAB.java @@ -0,0 +1,85 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::CommonBaseAB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::SeparateA` + * `MR::SeparateB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CommonBaseAB::CommonBaseAB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CommonBaseAB_ConstructFromAnother()`. + */ + public CommonBaseAB(mrbind_test.mr.CommonBaseAB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CommonBaseAB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CommonBaseAB_AssignFromAnother()`. + */ + public mrbind_test.mr.CommonBaseAB assignFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/Functions.java b/test/output_java/src/mrbind_test/mr/Functions.java new file mode 100644 index 00000000..c4017018 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/Functions.java @@ -0,0 +1,126 @@ +package mrbind_test.mr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::foo`. + * + * Calls `MR_foo()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::bar`. + * + * Calls `MR_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_vector_MR_A _1) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_bar.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generate a `shared_ptr` for this as well, to test how that gets separated. + * Generated from function `MR::mark_shared_common_base_ab`. + * + * Calls `MR_mark_shared_common_base_ab()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB mark_shared_common_base_ab() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_mark_shared_common_base_ab.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecA`. + * + * Calls `MR_GetSeparateVecA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateA GetSeparateVecA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_GetSeparateVecA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecB`. + * + * Calls `MR_GetSeparateVecB()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateB GetSeparateVecB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_GetSeparateVecB.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetCombinedVecAB`. + * + * Calls `MR_GetCombinedVecAB()`. + */ + public static mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB GetCombinedVecAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_combined_a_b.H0.MR_GetCombinedVecAB.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/SeparateA.java b/test/output_java/src/mrbind_test/mr/SeparateA.java new file mode 100644 index 00000000..a642c4fb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateA`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.a.H0.MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateA::SeparateA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateA_ConstructFromAnother()`. + */ + public SeparateA(mrbind_test.mr.SeparateA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateA_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/SeparateB.java b/test/output_java/src/mrbind_test/mr/SeparateB.java new file mode 100644 index 00000000..860759b4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateB`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.b.H0.MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateB::SeparateB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateB_ConstructFromAnother()`. + */ + public SeparateB(mrbind_test.mr.SeparateB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateB_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/abstractclasses/A.java b/test/output_java/src/mrbind_test/mr/abstractclasses/A.java new file mode 100644 index 00000000..a55dd2c6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/abstractclasses/A.java @@ -0,0 +1,35 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::A`. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} + + /** + * Generated from method `MR::AbstractClasses::A::foo`. + * + * Calls `MR_AbstractClasses_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/abstractclasses/B.java b/test/output_java/src/mrbind_test/mr/abstractclasses/B.java new file mode 100644 index 00000000..e35d3ed0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/abstractclasses/B.java @@ -0,0 +1,50 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::C` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from method `MR::AbstractClasses::B::foo`. + * + * Calls `MR_AbstractClasses_B_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java/src/mrbind_test/mr/abstractclasses/C.java new file mode 100644 index 00000000..543459df --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,50 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from method `MR::AbstractClasses::C::foo`. + * + * Calls `MR_AbstractClasses_C_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java/src/mrbind_test/mr/adjustingnames/A.java new file mode 100644 index 00000000..f042d84c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,209 @@ +package mrbind_test.mr.adjustingnames; + +/** + * And test that `uint64_t` is correctly adjusted in some other kinds of names. + * Though here we don't really test that each of them brings its own includes. + * Generated from class `MR::AdjustingNames::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_AdjustingNames_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::AdjustingNames::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_AdjustingNames_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.adjustingnames.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::AdjustingNames::A::operator unsigned long`. + * + * Calls `MR_AdjustingNames_A_ConvertTo_unsigned_long()`. + */ + public long convertTo_unsigned_long() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConvertTo_unsigned_long.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_AdjustingNames_A_AssignFromAnother()`. + */ + public mrbind_test.mr.adjustingnames.A assignFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.adjustingnames.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::foo`. + * + * Calls `MR_AdjustingNames_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::bar`. + * + * Calls `MR_AdjustingNames_A_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::AdjustingNames::A` named `var`. + * + * Calls `MR_AdjustingNames_A_Get_var_unsigned_long()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_unsigned_long.invokeExact(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::AdjustingNames::A` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_AdjustingNames_A_Set_var_unsigned_long()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_unsigned_long.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java new file mode 100644 index 00000000..c7883663 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.adjustingnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * When we're gonna call `foo()` in the source file, we must include the header for our typedef (and for the template arguments in general). + * And we must make sure that the typedef gets applied to the name correctly. + * Generated from function `MR::AdjustingNames::foo`. + * + * Calls `MR_AdjustingNames_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::AdjustingNames::bar`. + * + * Calls `MR_AdjustingNames_bar()`. + */ + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_bar.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/A.java b/test/output_java/src/mrbind_test/mr/aggregates/A.java new file mode 100644 index 00000000..5c6327db --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.aggregates; + +/** + * Aggregates get elementwise constructors. This is necessary if their elements are not default-constructible, + * because otherwise there would be no way to construct them. + * Generated from class `MR::Aggregates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::A` elementwise. + * The reference to the parameter `y` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFrom()`. + */ + public A(int x, java.lang.String y) + { + this(__ctor_constructFrom(x, y), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x, java.lang.String y) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_y = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(y, "y")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFrom.invokeExact(x, __str_y, mrbind_test.Ffi.end(__str_y)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.aggregates.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_A_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.A assignFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `x`. + * + * Calls `MR_Aggregates_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_y()`. + */ + public mrbind_test.mr.cs.std_string y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `y`. + * The reference to the parameter `value` might be preserved in this object in element `y`. + * + * Calls `MR_Aggregates_A_Set_y()`. + */ + public void setY(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/B.java b/test/output_java/src/mrbind_test/mr/aggregates/B.java new file mode 100644 index 00000000..fa2565ef --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/B.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.aggregates; + +/** + * This is an empty aggregate, it doesn't need an elementwise constructor. + * Generated from class `MR::Aggregates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.aggregates.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_B_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.B assignFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/C.java b/test/output_java/src/mrbind_test/mr/aggregates/C.java new file mode 100644 index 00000000..aed30f20 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,481 @@ +package mrbind_test.mr.aggregates; + +/** + * Test the optional limit on the number of fields that we aggregate-initialize. + * Generated from class `MR::Aggregates::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::C` elementwise. + * + * Calls `MR_Aggregates_C_ConstructFrom()`. + */ + public C(int a, int b, int c, int d, int e, int f, int g, int h) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.aggregates.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_C_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.C assignFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `a`. + * + * Calls `MR_Aggregates_C_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `b`. + * + * Calls `MR_Aggregates_C_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `c`. + * + * Calls `MR_Aggregates_C_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `d`. + * + * Calls `MR_Aggregates_C_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `e`. + * + * Calls `MR_Aggregates_C_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `f`. + * + * Calls `MR_Aggregates_C_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `g`. + * + * Calls `MR_Aggregates_C_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `h`. + * + * Calls `MR_Aggregates_C_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/D.java b/test/output_java/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..3aafeba2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,524 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::D` elementwise. + * + * Calls `MR_Aggregates_D_ConstructFrom()`. + */ + public D(int a, int b, int c, int d, int e, int f, int g, int h, int i) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h, i), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h, int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.aggregates.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_D_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.D assignFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `a`. + * + * Calls `MR_Aggregates_D_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `b`. + * + * Calls `MR_Aggregates_D_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `c`. + * + * Calls `MR_Aggregates_D_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `d`. + * + * Calls `MR_Aggregates_D_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `e`. + * + * Calls `MR_Aggregates_D_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `f`. + * + * Calls `MR_Aggregates_D_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `g`. + * + * Calls `MR_Aggregates_D_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `h`. + * + * Calls `MR_Aggregates_D_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `i`. + * + * Calls `MR_Aggregates_D_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/E.java b/test/output_java/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..ef7cdd4a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,572 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::E`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.aggregates.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::Aggregates::E` elementwise. + * The reference to the parameter `j` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFrom()`. + */ + public E(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h, i, j), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i, mrbind_test.Ffi.ptrNonNull(j, "j")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(j); + } + } + + /** + * Generated from method `MR::Aggregates::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_E_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.E assignFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `a`. + * + * Calls `MR_Aggregates_E_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `b`. + * + * Calls `MR_Aggregates_E_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `c`. + * + * Calls `MR_Aggregates_E_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `d`. + * + * Calls `MR_Aggregates_E_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `e`. + * + * Calls `MR_Aggregates_E_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `f`. + * + * Calls `MR_Aggregates_E_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `g`. + * + * Calls `MR_Aggregates_E_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `h`. + * + * Calls `MR_Aggregates_E_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `i`. + * + * Calls `MR_Aggregates_E_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `j`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_j()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible j() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `j`. + * The reference to the parameter `value` might be preserved in this object in element `j`. + * + * Calls `MR_Aggregates_E_Set_j()`. + */ + public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java b/test/output_java/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java new file mode 100644 index 00000000..519a6f4d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java @@ -0,0 +1,80 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible assignFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/A.java b/test/output_java/src/mrbind_test/mr/bases/A.java new file mode 100644 index 00000000..90d91fef --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/A.java @@ -0,0 +1,117 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::A`. + * Derived classes: + * Virtual: + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * `MR::Bases::H` + * Indirect: (non-virtual) + * `MR::Bases::B2` + * Ambiguous: + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.bases.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_A_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.A assignFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/B.java b/test/output_java/src/mrbind_test/mr/bases/B.java new file mode 100644 index 00000000..059c527a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,113 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::B2` + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.bases.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/B2.java b/test/output_java/src/mrbind_test/mr/bases/B2.java new file mode 100644 index 00000000..fe608fea --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Indirect: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B2_DefaultConstruct()`. + */ + public B2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B2::B2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B2_ConstructFromAnother()`. + */ + public B2(mrbind_test.mr.bases.B2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/C.java b/test/output_java/src/mrbind_test/mr/bases/C.java new file mode 100644 index 00000000..69464400 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.bases.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_C_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/D.java b/test/output_java/src/mrbind_test/mr/bases/D.java new file mode 100644 index 00000000..8d5bf1eb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/D.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.bases.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D assignFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/D2.java b/test/output_java/src/mrbind_test/mr/bases/D2.java new file mode 100644 index 00000000..5bff36d9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/D2.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D2_DefaultConstruct()`. + */ + public D2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D2::D2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D2_ConstructFromAnother()`. + */ + public D2(mrbind_test.mr.bases.D2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D2 assignFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/D3.java b/test/output_java/src/mrbind_test/mr/bases/D3.java new file mode 100644 index 00000000..200c7d58 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/D3.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D3`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D3 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D3(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D3::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D3_DefaultConstruct()`. + */ + public D3() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D3::D3`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D3_ConstructFromAnother()`. + */ + public D3(mrbind_test.mr.bases.D3 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D3::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D3_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D3 assignFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D3(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/E.java b/test/output_java/src/mrbind_test/mr/bases/E.java new file mode 100644 index 00000000..f48fb98c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/E.java @@ -0,0 +1,111 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::E`. + * Derived classes: + * Non-virtual along a virtual path: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.bases.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_E_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.E assignFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/F.java b/test/output_java/src/mrbind_test/mr/bases/F.java new file mode 100644 index 00000000..5a36fb67 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,112 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::E` + * Derived classes: + * Virtual: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.bases.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_F_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/G.java b/test/output_java/src/mrbind_test/mr/bases/G.java new file mode 100644 index 00000000..3155697f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::G`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.bases.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_G_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/H.java b/test/output_java/src/mrbind_test/mr/bases/H.java new file mode 100644 index 00000000..06f6cf1f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,111 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::H`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * Direct: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.bases.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_H_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/bases/I.java b/test/output_java/src/mrbind_test/mr/bases/I.java new file mode 100644 index 00000000..15ceaabf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::I`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * `MR::Bases::A` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.bases.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_I_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/convops/A.java b/test/output_java/src/mrbind_test/mr/convops/A.java new file mode 100644 index 00000000..5760a6a2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/convops/A.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.convops; + +/** + * Generated from class `MR::ConvOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_ConvOps_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::ConvOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_ConvOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.convops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::ConvOps::A::operator bool`. + * + * Calls `MR_ConvOps_A_ConvertTo_bool()`. + */ + public boolean convertTo_bool() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConvertTo_bool.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::ConvOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_ConvOps_A_AssignFromAnother()`. + */ + public mrbind_test.mr.convops.A assignFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.convops.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java new file mode 100644 index 00000000..1de169f3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,287 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::A`. + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::A` elementwise. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFrom()`. + */ + public A(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.copyinheritedmembers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::A::operator int`. + * + * Calls `MR_CopyInheritedMembers_A_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.A assignFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::Method`. + * + * Calls `MR_CopyInheritedMembers_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * + * Calls `MR_CopyInheritedMembers_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..2453dd45 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,277 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::B` elementwise. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFrom()`. + */ + public B(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.copyinheritedmembers.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::B::operator int`. + * + * Calls `MR_CopyInheritedMembers_B_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_B_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.B assignFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::Method`. + * + * Calls `MR_CopyInheritedMembers_B_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_B_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_B_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * + * Calls `MR_CopyInheritedMembers_B_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..5ce956a4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.copyinheritedmembers.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_C_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java new file mode 100644 index 00000000..6d755f8f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,253 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::B` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.copyinheritedmembers.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::D::operator int`. + * + * Calls `MR_CopyInheritedMembers_D_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_D_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::Method`. + * + * Calls `MR_CopyInheritedMembers_D_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_D_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::D` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_D_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::D` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_D_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::D` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_D_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::D` named `Field`. + * + * Calls `MR_CopyInheritedMembers_D_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java new file mode 100644 index 00000000..ec4cfd93 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::E`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.copyinheritedmembers.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_E_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java new file mode 100644 index 00000000..2f3915a4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::D` + * `MR::CopyInheritedMembers::A` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.copyinheritedmembers.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_F_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java new file mode 100644 index 00000000..706d00c5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,255 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::G`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.copyinheritedmembers.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::G::operator int`. + * + * Calls `MR_CopyInheritedMembers_G_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_G_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::Method`. + * + * Calls `MR_CopyInheritedMembers_G_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_G_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::G` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_G_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::G` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_G_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::G` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_G_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::G` named `Field`. + * + * Calls `MR_CopyInheritedMembers_G_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java new file mode 100644 index 00000000..00c5a3c5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,251 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::H`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.copyinheritedmembers.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::H::operator int`. + * + * Calls `MR_CopyInheritedMembers_H_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_H_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::Method`. + * + * Calls `MR_CopyInheritedMembers_H_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_H_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::H` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_H_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::H` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_H_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::H` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_H_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::H` named `Field`. + * + * Calls `MR_CopyInheritedMembers_H_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java new file mode 100644 index 00000000..de5b7a6d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,251 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::I`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.copyinheritedmembers.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::I::operator int`. + * + * Calls `MR_CopyInheritedMembers_I_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_I_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::Method`. + * + * Calls `MR_CopyInheritedMembers_I_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_I_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::I` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_I_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::I` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_I_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::I` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_I_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::I` named `Field`. + * + * Calls `MR_CopyInheritedMembers_I_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java new file mode 100644 index 00000000..69106d9e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,257 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::J`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class J extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public J(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? J::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_J_DefaultConstruct()`. + */ + public J() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::J::J`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_J_ConstructFromAnother()`. + */ + public J(mrbind_test.mr.copyinheritedmembers.J _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::J::operator int`. + * + * Calls `MR_CopyInheritedMembers_J_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_J_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::Method`. + * + * Calls `MR_CopyInheritedMembers_J_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_J_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::J` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_J_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::J` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_J_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::J` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_J_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::J` named `Field`. + * + * Calls `MR_CopyInheritedMembers_J_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/K.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/K.java new file mode 100644 index 00000000..7134f071 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/K.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::K`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class K extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public K(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? K::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_K_DefaultConstruct()`. + */ + public K() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::K::K`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_K_ConstructFromAnother()`. + */ + public K(mrbind_test.mr.copyinheritedmembers.K _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::K::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_K_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.K assignFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.K(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/L.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/L.java new file mode 100644 index 00000000..58b3e2a5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/L.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::L`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::J` + * `MR::CopyInheritedMembers::G` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class L extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public L(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? L::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_L_DefaultConstruct()`. + */ + public L() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::L::L`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_L_ConstructFromAnother()`. + */ + public L(mrbind_test.mr.copyinheritedmembers.L _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::L::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_L_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.L assignFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.L(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java new file mode 100644 index 00000000..096eda55 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,257 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Now test that a non-virtual base of a virtual base gets treated as a virtual. + * Generated from class `MR::CopyInheritedMembers::M`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class M extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public M(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? M::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_M_DefaultConstruct()`. + */ + public M() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::M::M`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_M_ConstructFromAnother()`. + */ + public M(mrbind_test.mr.copyinheritedmembers.M _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::M::operator int`. + * + * Calls `MR_CopyInheritedMembers_M_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_M_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::Method`. + * + * Calls `MR_CopyInheritedMembers_M_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_M_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::M` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_M_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::M` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_M_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::M` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_M_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::M` named `Field`. + * + * Calls `MR_CopyInheritedMembers_M_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java new file mode 100644 index 00000000..35988493 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,256 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::N`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::M` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class N extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public N(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? N::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_N_DefaultConstruct()`. + */ + public N() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::N::N`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_N_ConstructFromAnother()`. + */ + public N(mrbind_test.mr.copyinheritedmembers.N _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::N::operator int`. + * + * Calls `MR_CopyInheritedMembers_N_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_N_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::Method`. + * + * Calls `MR_CopyInheritedMembers_N_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_N_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::N` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_N_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::N` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_N_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::N` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_N_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::N` named `Field`. + * + * Calls `MR_CopyInheritedMembers_N_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java new file mode 100644 index 00000000..0ef9cad8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,255 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::O`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::M` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class O extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public O(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? O::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_O_DefaultConstruct()`. + */ + public O() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::O::O`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_O_ConstructFromAnother()`. + */ + public O(mrbind_test.mr.copyinheritedmembers.O _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::O::operator int`. + * + * Calls `MR_CopyInheritedMembers_O_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_O_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::Method`. + * + * Calls `MR_CopyInheritedMembers_O_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_O_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::O` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_O_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::O` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_O_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::O` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_O_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::O` named `Field`. + * + * Calls `MR_CopyInheritedMembers_O_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/Functions.java b/test/output_java/src/mrbind_test/mr/cs/Functions.java new file mode 100644 index 00000000..6a8dc101 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/Functions.java @@ -0,0 +1,2680 @@ +package mrbind_test.mr.cs; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Returns the `stdout` stream. + * + * Calls `MR_C_GetStdCout()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCout.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, buffered. + * + * Calls `MR_C_GetStdCerr()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCerr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCerr.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, unbuffered. + * + * Calls `MR_C_GetStdClog()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdClog() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdClog.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stdin` stream. + * + * Calls `MR_C_GetStdCin()`. + */ + public static mrbind_test.mr.cs.std_istream GetStdCin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCin.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_istream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_node_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_node_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_set_int_const_iterator a, mrbind_test.phmap.phmap_btree_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_equal_MR_C_phmap_btree_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator a, mrbind_test.phmap.phmap_btree_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_iterator a, mrbind_test.phmap.phmap_btree_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator a, mrbind_test.phmap.phmap_btree_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator a, mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator a, mrbind_test.phmap.phmap_btree_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_unsigned_long_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator a, mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_sub_MR_C_std_vector_unsigned_long_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_unsigned_long_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator a, mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_equal_MR_C_std_vector_unsigned_long_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_unsigned_long_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_unsigned_long_iterator a, mrbind_test.mr.cs.std_vector_unsigned_long_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_sub_MR_C_std_vector_unsigned_long_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_unsigned_long_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_unsigned_long_iterator a, mrbind_test.mr.cs.std_vector_unsigned_long_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_equal_MR_C_std_vector_unsigned_long_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_long_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_long_const_iterator a, mrbind_test.mr.cs.std_vector_long_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_sub_MR_C_std_vector_long_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_long_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_long_const_iterator a, mrbind_test.mr.cs.std_vector_long_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_equal_MR_C_std_vector_long_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_long_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_long_iterator a, mrbind_test.mr.cs.std_vector_long_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_sub_MR_C_std_vector_long_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_long_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_long_iterator a, mrbind_test.mr.cs.std_vector_long_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_equal_MR_C_std_vector_long_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int_const_iterator a, mrbind_test.mr.cs.std_vector_int_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_const_iterator a, mrbind_test.mr.cs.std_vector_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int_iterator a, mrbind_test.mr.cs.std_vector_int_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_iterator a, mrbind_test.mr.cs.std_vector_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int_const_iterator a, mrbind_test.mr.cs.std_deque_int_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_const_iterator a, mrbind_test.mr.cs.std_deque_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind_test.mr.cs.std_deque_int_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind_test.mr.cs.std_deque_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int_const_iterator a, mrbind_test.mr.cs.std_list_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int_iterator a, mrbind_test.mr.cs.std_list_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_int_const_iterator a, mrbind_test.mr.cs.std_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_equal_MR_C_std_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_int_const_iterator a, mrbind_test.mr.cs.std_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_equal_MR_C_std_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_int_const_iterator a, mrbind_test.mr.cs.std_unordered_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_equal_MR_C_std_unordered_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_const_iterator a, mrbind_test.mr.cs.std_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_iterator a, mrbind_test.mr.cs.std_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_const_iterator a, mrbind_test.mr.cs.std_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_iterator a, mrbind_test.mr.cs.std_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_iterator a, mrbind_test.mr.cs.std_unordered_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_float_const_iterator a, mrbind_test.mr.cs.std_multiset_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_equal_MR_C_std_multiset_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_float_const_iterator a, mrbind_test.mr.cs.std_set_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_equal_MR_C_std_set_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java b/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..8b73fe8e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,296 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::A` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_A_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_A_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_A_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_A_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother()`. + */ + public std_array_MR_StdContainers_A_42(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at()`. + */ + public mrbind_test.mr.stdcontainers.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..a0963b96 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,243 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::NonAssignable` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_NonAssignable_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_NonAssignable_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_NonAssignable_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_NonAssignable_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_array_int_43.java b/test/output_java/src/mrbind_test/mr/cs/std_array_int_43.java new file mode 100644 index 00000000..780fe945 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_array_int_43.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int` of size 43. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int_43 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(43, java.lang.foreign.ValueLayout.JAVA_INT)}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 172, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int_43(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int_43 copy() {return new std_array_int_43(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int_43 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4);} + public void setElems(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int_43() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java b/test/output_java/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java new file mode 100644 index 00000000..ec688e4c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int[3][4]` of size 5. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int_array_4_array_3_5 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.ValueLayout.JAVA_INT)))}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 240, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int_array_4_array_3_5(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int_array_4_array_3_5 copy() {return new std_array_int_array_4_array_3_5(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int_array_4_array_3_5 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0, int i1, int i2) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4);} + public void setElems(int i0, int i1, int i2, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int_array_4_array_3_5() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..8cfda3a9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,674 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..cc703535 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..07fc84dd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_int.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_int.java new file mode 100644 index 00000000..af94dce1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_int.java @@ -0,0 +1,868 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_DefaultConstruct()`. + */ + public std_deque_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_ConstructFromAnother()`. + */ + public std_deque_int(mrbind_test.mr.cs.std_deque_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_deque_int_ConstructFromRange()`. + */ + public std_deque_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_deque_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_deque_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_deque_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * + * Calls `MR_C_std_deque_int_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_int_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_deque_int_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_deque_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_deque_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_deque_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_begin()`. + */ + public mrbind_test.mr.cs.std_deque_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_end()`. + */ + public mrbind_test.mr.cs.std_deque_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_int_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_int_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java new file mode 100644 index 00000000..8b9ffc45 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_const_iterator_DefaultConstruct()`. + */ + public std_deque_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_const_iterator_ConstructFromAnother()`. + */ + public std_deque_int_const_iterator(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_int_const_iterator_from_mutable()`. + */ + public std_deque_int_const_iterator(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_deque_int_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_deque_int_iterator.java new file mode 100644 index 00000000..53c22c7d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_deque_int_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_iterator_DefaultConstruct()`. + */ + public std_deque_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_iterator_ConstructFromAnother()`. + */ + public std_deque_int_iterator(mrbind_test.mr.cs.std_deque_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..38e6e76a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::E1` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_E1_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_E1_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_E1_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_E1_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_E1_float(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_value()`. + */ + public mrbind_test.mr.csharp.E1 value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..46202fa7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayoutSh` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_ExposedLayoutSh_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_ExposedLayoutSh_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_ExposedLayoutSh_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_ExposedLayoutSh_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_ExposedLayoutSh_float(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..842044db --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayout` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_ExposedLayout_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_ExposedLayout_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_ExposedLayout_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_ExposedLayout_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_ExposedLayout_float(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..b8083ade --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::NonTrivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_NonTrivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_NonTrivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_NonTrivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_NonTrivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_NonTrivial_float(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..13aa7719 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::SA` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_SA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_SA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_SA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_SA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_SA_float(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..30a2235d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::Trivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_Trivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_Trivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_Trivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_Trivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_Trivial_float(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_int_float.java new file mode 100644 index 00000000..7383c069 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_int_float.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_int_float_DefaultConstruct()`. + */ + public std_expected_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_int_float_ConstructFromAnother()`. + */ + public std_expected_int_float(mrbind_test.mr.cs.std_expected_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_float other) + { + try + { + mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_int_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_int_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_int_std_string.java new file mode 100644 index 00000000..41a814d0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_int_std_string.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int` that represents success or a `std::string` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_int_std_string_DefaultConstruct()`. + */ + public std_expected_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_int_std_string_ConstructFromAnother()`. + */ + public std_expected_int_std_string(mrbind_test.mr.cs.std_expected_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_std_string other) + { + try + { + mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_int_std_string_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_error()`. + */ + public mrbind_test.mr.cs.std_string error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_error_mut()`. + */ + public mrbind_test.mr.cs.std_string error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_expected_void_float.java b/test/output_java/src/mrbind_test/mr/cs/std_expected_void_float.java new file mode 100644 index 00000000..856d1043 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_expected_void_float.java @@ -0,0 +1,196 @@ +package mrbind_test.mr.cs; + +/** + * Stores either nothing (which represents success) or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_void_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_void_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_void_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_void_float_DefaultConstruct()`. + */ + public std_expected_void_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_void_float_ConstructFromAnother()`. + */ + public std_expected_void_float(mrbind_test.mr.cs.std_expected_void_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_void_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_void_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_void_float other) + { + try + { + mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_void_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores nothing (which represents success). + * + * Calls `MR_C_std_expected_void_float_value()`. + */ + public boolean value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_void_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_void_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_filesystem_path.java b/test/output_java/src/mrbind_test/mr/cs/std_filesystem_path.java new file mode 100644 index 00000000..222747a8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_filesystem_path.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.cs; + +/** + * Stores a filesystem path. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_filesystem_path extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_filesystem_path(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_filesystem_path::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_filesystem_path_DefaultConstruct()`. + */ + public std_filesystem_path() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_filesystem_path_ConstructFromAnother()`. + */ + public std_filesystem_path(mrbind_test.mr.cs.std_filesystem_path other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_filesystem_path_ConstructFrom()`. + */ + public std_filesystem_path(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_filesystem_path_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_filesystem_path_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Get the contents as a UTF8-encoded string. + * + * Calls `MR_C_std_filesystem_path_string()`. + */ + public mrbind_test.mr.cs.std_string string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..f4f90006 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::E1(MR::CSharp::E1)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_E1_from_MR_CSharp_E1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call()`. + */ + public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call.invokeExact(rawPointer(), java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..ca23b592 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::ExposedLayoutC(MR::CSharp::ExposedLayoutC)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.ExposedLayoutC(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..b04dd906 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::A(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_A(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_A_call()`. + */ + public mrbind_test.mr.stdfunction.A call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.stdfunction.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java new file mode 100644 index 00000000..5065cb9f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::E(int, MR::StdFunction::E)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_E_from_int_MR_StdFunction_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call()`. + */ + public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call.invokeExact(rawPointer(), _1, java.util.Objects.requireNonNull(_2, "_2").value); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.stdfunction.E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int.java new file mode 100644 index 00000000..9f110e17 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_DefaultConstruct()`. + */ + public std_function_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_ConstructFromAnother()`. + */ + public std_function_int(mrbind_test.mr.cs.std_function_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int other) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_call()`. + */ + public int call() + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java new file mode 100644 index 00000000..cca0e0f5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_from_int_int_DefaultConstruct()`. + */ + public std_function_int_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_from_int_int_ConstructFromAnother()`. + */ + public std_function_int_from_int_int(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_from_int_int_call()`. + */ + public int call(int _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java new file mode 100644 index 00000000..f1d11eaa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_from_std_string_DefaultConstruct()`. + */ + public std_function_int_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_from_std_string_ConstructFromAnother()`. + */ + public std_function_int_from_std_string(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_from_std_string_call()`. + */ + public int call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java new file mode 100644 index 00000000..63912be8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int &(int &, int &&)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_ref_from_int_ref_int_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_ref_from_int_ref_int_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_ref_from_int_ref_int_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int_ref_from_int_ref_int_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int_ref_from_int_ref_int_rvalue_ref(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java new file mode 100644 index 00000000..839baa0c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int &&(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int_rvalue_ref(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java new file mode 100644 index 00000000..c06bb6d1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int, float)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int_float_DefaultConstruct()`. + */ + public std_function_std_string_from_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int_float_ConstructFromAnother()`. + */ + public std_function_std_string_from_int_float(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int_float_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int_float_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int_float_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java new file mode 100644 index 00000000..a4a2dfc3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int_int_DefaultConstruct()`. + */ + public std_function_std_string_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int_int_ConstructFromAnother()`. + */ + public std_function_std_string_from_int_int(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int_int_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void.java new file mode 100644 index 00000000..02992f6e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_DefaultConstruct()`. + */ + public std_function_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_ConstructFromAnother()`. + */ + public std_function_void(mrbind_test.mr.cs.std_function_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_call()`. + */ + public void call() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..6a984cf4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(MR::StdFunction::A)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_void_from_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_void_from_MR_StdFunction_A(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_call()`. + */ + public void call(mrbind_test.mr.stdfunction.A _1) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java new file mode 100644 index 00000000..5173f357 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_int_int_DefaultConstruct()`. + */ + public std_function_void_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_int_int_ConstructFromAnother()`. + */ + public std_function_void_from_int_int(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_int_int_call()`. + */ + public void call(int _1, int _2) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java new file mode 100644 index 00000000..0f4725f5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_std_string_DefaultConstruct()`. + */ + public std_function_void_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructFromAnother()`. + */ + public std_function_void_from_std_string(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_std_string_call()`. + */ + public void call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_istream.java b/test/output_java/src/mrbind_test/mr/cs/std_istream.java new file mode 100644 index 00000000..3b52c064 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_istream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ input stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_istream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_istream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..bbfa5193 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,695 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonAssignable value) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..87580369 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,199 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..67a27b6e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_int.java b/test/output_java/src/mrbind_test/mr/cs/std_list_int.java new file mode 100644 index 00000000..55bf0b94 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_int.java @@ -0,0 +1,728 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_DefaultConstruct()`. + */ + public std_list_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_ConstructFromAnother()`. + */ + public std_list_int(mrbind_test.mr.cs.std_list_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_list_int_ConstructFromRange()`. + */ + public std_list_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_list_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_list_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * + * Calls `MR_C_std_list_int_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_int_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_list_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator position) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_begin()`. + */ + public mrbind_test.mr.cs.std_list_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_end()`. + */ + public mrbind_test.mr.cs.std_list_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_list_int_const_iterator.java new file mode 100644 index 00000000..77efe0b5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_int_const_iterator.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_const_iterator_DefaultConstruct()`. + */ + public std_list_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_const_iterator_ConstructFromAnother()`. + */ + public std_list_int_const_iterator(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_int_const_iterator_from_mutable()`. + */ + public std_list_int_const_iterator(mrbind_test.mr.cs.std_list_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_list_int_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_list_int_iterator.java new file mode 100644 index 00000000..6c653c07 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_list_int_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_iterator_DefaultConstruct()`. + */ + public std_list_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_iterator_ConstructFromAnother()`. + */ + public std_list_int_iterator(mrbind_test.mr.cs.std_list_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int_iterator other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..316caf47 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,461 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..c5049742 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,248 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..8dae40fb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float.java new file mode 100644 index 00000000..e82606ce --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_DefaultConstruct()`. + */ + public std_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_ConstructFromAnother()`. + */ + public std_map_int_float(mrbind_test.mr.cs.std_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_end()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java new file mode 100644 index 00000000..8aaecc4a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java @@ -0,0 +1,247 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_const_iterator_DefaultConstruct()`. + */ + public std_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_int_float_const_iterator(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_int_float_const_iterator_from_mutable()`. + */ + public std_map_int_float_const_iterator(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_iterator.java new file mode 100644 index 00000000..4bf2faeb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_map_int_float_iterator.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_iterator_DefaultConstruct()`. + */ + public std_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_iterator_ConstructFromAnother()`. + */ + public std_map_int_float_iterator(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..45b15283 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,436 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..c0e6262f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,248 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..0d8d6aa3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float.java new file mode 100644 index 00000000..f6ebf710 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float.java @@ -0,0 +1,433 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_DefaultConstruct()`. + */ + public std_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_ConstructFromAnother()`. + */ + public std_multimap_int_float(mrbind_test.mr.cs.std_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..ac379b98 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java @@ -0,0 +1,247 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_from_mutable()`. + */ + public std_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java new file mode 100644 index 00000000..9d4ba42d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_iterator_DefaultConstruct()`. + */ + public std_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_int_float_iterator(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..146ed89a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,339 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..9efcb155 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_float.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_float.java new file mode 100644 index 00000000..af0326b2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_float.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_DefaultConstruct()`. + */ + public std_multiset_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_ConstructFromAnother()`. + */ + public std_multiset_float(mrbind_test.mr.cs.std_multiset_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_float_ConstructFromRange()`. + */ + public std_multiset_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_float_count()`. + */ + public long count(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_find()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_multiset_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_end()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java new file mode 100644 index 00000000..97bafc7a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_const_iterator_DefaultConstruct()`. + */ + public std_multiset_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_float_const_iterator(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_int.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_int.java new file mode 100644 index 00000000..83604e8b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_int.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int_DefaultConstruct()`. + */ + public std_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int_ConstructFromAnother()`. + */ + public std_multiset_int(mrbind_test.mr.cs.std_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int other) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_int_ConstructFromRange()`. + */ + public std_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_find()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_end()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java new file mode 100644 index 00000000..c799aa43 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int_const_iterator_DefaultConstruct()`. + */ + public std_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_int_const_iterator(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..9dfd4d60 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::ExposedLayoutSh` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..d73ec4ca --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::NonTrivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.csharp.NonTrivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..c1908c81 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::SA` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFrom()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.csharp.SA other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..c759c355 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::Trivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.csharp.Trivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..3a62455c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::A` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.stdoptional.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value()`. + */ + public mrbind_test.mr.stdoptional.A value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value_mut()`. + */ + public mrbind_test.mr.stdoptional.A value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..3276872d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::B` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.stdoptional.B other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value()`. + */ + public mrbind_test.mr.stdoptional.B value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value_mut()`. + */ + public mrbind_test.mr.stdoptional.B value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..4e677ea0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::E` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.stdoptional.E other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value()`. + */ + public mrbind_test.mr.stdoptional.E value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : mrbind_test.mr.stdoptional.E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_int.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_int.java new file mode 100644 index 00000000..e78353fa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_int.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `int` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_int_DefaultConstruct()`. + */ + public std_optional_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_int_ConstructFromAnother()`. + */ + public std_optional_int(mrbind_test.mr.cs.std_optional_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_int_ConstructFrom()`. + */ + public std_optional_int(int other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_int other) + { + try + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_int_AssignFrom()`. + */ + public void assignFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_optional_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_optional_std_string.java new file mode 100644 index 00000000..ba3496bf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_optional_std_string.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `std::string` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_std_string_DefaultConstruct()`. + */ + public std_optional_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_std_string_ConstructFromAnother()`. + */ + public std_optional_std_string(mrbind_test.mr.cs.std_optional_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_std_string_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_optional_std_string(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + this(__ctor_constructFrom(other, other_end), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFrom.invokeExact(other, other_end); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_std_string_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFrom.invokeExact(rawPointer(), other, other_end); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value()`. + */ + public mrbind_test.mr.cs.std_string value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value_mut()`. + */ + public mrbind_test.mr.cs.std_string value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_ostream.java b/test/output_java/src/mrbind_test/mr/cs/std_ostream.java new file mode 100644 index 00000000..b3b4ce34 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_ostream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ output stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_ostream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_ostream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..61fcedfb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,209 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `MR::SeparateA` and `MR::SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(second, "second")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + java.lang.ref.Reference.reachabilityFence(second); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first()`. + */ + public mrbind_test.mr.SeparateA first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut()`. + */ + public mrbind_test.mr.SeparateA first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second()`. + */ + public mrbind_test.mr.SeparateB second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut()`. + */ + public mrbind_test.mr.SeparateB second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..2781e8ec --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const MR::StdContainers::NonAssignable` and `const MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), second); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_float.java new file mode 100644 index 00000000..1cc4aa66 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_float.java @@ -0,0 +1,174 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int` and `const int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_int_float_DefaultConstruct()`. + */ + public std_pair_const_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_float_ConstructFromAnother()`. + */ + public std_pair_const_int_float(mrbind_test.mr.cs.std_pair_const_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * + * Calls `MR_C_std_pair_const_int_float_Construct()`. + */ + public std_pair_const_int_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java new file mode 100644 index 00000000..4e419385 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int &` and `const int &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_ref_const_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_ref_const_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_ref_const_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother()`. + */ + public std_pair_const_int_ref_const_float_ref(mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_Construct()`. + */ + public std_pair_const_int_ref_const_float_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..f44620bd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int &&` and `const int &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_rvalue_ref_const_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct()`. + */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_float.java new file mode 100644 index 00000000..9d7c77cb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_float.java @@ -0,0 +1,222 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int` and `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int_float_DefaultConstruct()`. + */ + public std_pair_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_float_ConstructFromAnother()`. + */ + public std_pair_int_float(mrbind_test.mr.cs.std_pair_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_float other) + { + try + { + mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * + * Calls `MR_C_std_pair_int_float_Construct()`. + */ + public std_pair_int_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java new file mode 100644 index 00000000..24659c6a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java @@ -0,0 +1,99 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int &` and `int &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_ref_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_ref_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_ref_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_ref_float_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int_ref_float_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_ref_float_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_ref_float_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..337b717e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int &&` and `int &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_rvalue_ref_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_rvalue_ref_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_int_rvalue_ref_float_rvalue_ref(mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_pair_int_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_std_string.java new file mode 100644 index 00000000..582f8e4b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_pair_int_std_string.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int` and `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int_std_string_DefaultConstruct()`. + */ + public std_pair_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_std_string_ConstructFromAnother()`. + */ + public std_pair_int_std_string(mrbind_test.mr.cs.std_pair_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_std_string other) + { + try + { + mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_std_string_Construct()`. + */ + public std_pair_int_std_string(int first, java.lang.String second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, java.lang.String second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_second = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(second, "second")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_Construct.invokeExact(first, __str_second, mrbind_test.Ffi.end(__str_second)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_second()`. + */ + public mrbind_test.mr.cs.std_string second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_second_mut()`. + */ + public mrbind_test.mr.cs.std_string second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..8d32adf3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,339 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..48621f01 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_float.java b/test/output_java/src/mrbind_test/mr/cs/std_set_float.java new file mode 100644 index 00000000..338b722d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_float.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_DefaultConstruct()`. + */ + public std_set_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_ConstructFromAnother()`. + */ + public std_set_float(mrbind_test.mr.cs.std_set_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_float_ConstructFromRange()`. + */ + public std_set_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_float_contains()`. + */ + public boolean contains(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_find()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_set_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_begin()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_end()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_set_float_const_iterator.java new file mode 100644 index 00000000..2ec4fc19 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_float_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_const_iterator_DefaultConstruct()`. + */ + public std_set_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_const_iterator_ConstructFromAnother()`. + */ + public std_set_float_const_iterator(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_int.java b/test/output_java/src/mrbind_test/mr/cs/std_set_int.java new file mode 100644 index 00000000..b5e1d1da --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int_DefaultConstruct()`. + */ + public std_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int_ConstructFromAnother()`. + */ + public std_set_int(mrbind_test.mr.cs.std_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int other) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_int_ConstructFromRange()`. + */ + public std_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_find()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_begin()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_end()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_set_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_set_int_const_iterator.java new file mode 100644 index 00000000..14862712 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_set_int_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int_const_iterator_DefaultConstruct()`. + */ + public std_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int_const_iterator_ConstructFromAnother()`. + */ + public std_set_int_const_iterator(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..eed523a3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,418 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::ExposedLayoutSh`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructFromValue(mrbind_test.mr.csharp.ExposedLayoutSh value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh construct(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..520b3fcb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..4f78dc96 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_get()`. + */ + public mrbind_test.mr.csharp.SE get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SE_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructFromValue(mrbind_test.mr.csharp.SE value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE construct(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..73d9bd0f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,389 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_get()`. + */ + public mrbind_test.mr.csharp.SG get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SG_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG construct(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG constructNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..b164cd32 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CommonBaseAB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CommonBaseAB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_get()`. + */ + public mrbind_test.mr.CommonBaseAB get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CommonBaseAB_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructFromValue(mrbind_test.mr.CommonBaseAB value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB construct(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Assign()`. + */ + public void assign(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..5ccd29b4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..525b196c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..fc76f28a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,389 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..32760b4a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,469 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..32d374d6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,469 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..9636c178 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,495 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..cbab05ef --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,445 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java new file mode 100644 index 00000000..f8c7e3fa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java @@ -0,0 +1,456 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_DefaultConstruct()`. + */ + public std_shared_ptr_const_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructAliasing()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java new file mode 100644 index 00000000..3e09d015 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java @@ -0,0 +1,491 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_int_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_Construct()`. + */ + public std_shared_ptr_const_int_array(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_array_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int_array(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java new file mode 100644 index 00000000..6c4c5c3e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java @@ -0,0 +1,442 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_int_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_Construct()`. + */ + public std_shared_ptr_const_int_array_42(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int_array_42(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java new file mode 100644 index 00000000..62f7fd10 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java @@ -0,0 +1,350 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_void_DefaultConstruct()`. + */ + public std_shared_ptr_const_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromAnother()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromMutable()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int.java new file mode 100644 index 00000000..6bd14ce2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int.java @@ -0,0 +1,405 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_DefaultConstruct()`. + */ + public std_shared_ptr_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructFromAnother()`. + */ + public std_shared_ptr_int(mrbind_test.mr.cs.std_shared_ptr_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * + * Calls `MR_C_std_shared_ptr_int_ConstructFromValue()`. + */ + public std_shared_ptr_int(int value) + { + this(__ctor_constructFromValue(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java new file mode 100644 index 00000000..8785395e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java @@ -0,0 +1,430 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_array_DefaultConstruct()`. + */ + public std_shared_ptr_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructFromAnother()`. + */ + public std_shared_ptr_int_array(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructFromSize()`. + */ + public std_shared_ptr_int_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_array_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java new file mode 100644 index 00000000..a5b79bf2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_int_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_int_array_42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_42_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_42_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_array_42_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_void.java b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_void.java new file mode 100644 index 00000000..e1f89652 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_shared_ptr_void.java @@ -0,0 +1,299 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_void_DefaultConstruct()`. + */ + public std_shared_ptr_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructFromAnother()`. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_string.java new file mode 100644 index 00000000..f5a89865 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_string.java @@ -0,0 +1,286 @@ +package mrbind_test.mr.cs; + +/** + * A heap-allocated null-terminated string. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_DefaultConstruct()`. + */ + public std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_ConstructFromAnother()`. + */ + public std_string(mrbind_test.mr.cs.std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_string_ConstructFrom()`. + */ + public std_string(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_string_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string, excluding the null-terminator. + * + * Calls `MR_C_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** The contents, decoded as UTF-8. */ + @java.lang.Override public java.lang.String toString() + { + try + { + return mrbind_test.Ffi.string((java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()), (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer())); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_string_view.java b/test/output_java/src/mrbind_test/mr/cs/std_string_view.java new file mode 100644 index 00000000..38b6d2a2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_string_view.java @@ -0,0 +1,223 @@ +package mrbind_test.mr.cs; + +/** + * A non-owning string view. Not necessarily null-terminated. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string_view extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string_view(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string_view::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_view_DefaultConstruct()`. + */ + public std_string_view() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFromAnother()`. + */ + public std_string_view(mrbind_test.mr.cs.std_string_view other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFrom()`. + */ + public std_string_view(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string. + * + * Calls `MR_C_std_string_view_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, NOT necessarily null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string. Not dereferencable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple.java new file mode 100644 index 00000000..33b85c6e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.cs; + +/** + * Stores 0 objects. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_DefaultConstruct()`. + */ + public std_tuple() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_ConstructFromAnother()`. + */ + public std_tuple(mrbind_test.mr.cs.std_tuple other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8edc1eee --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,184 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout`, `const MR::CSharp::ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..71b5a4f3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &`, `const MR::CSharp::ExposedLayout &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..2727d2f7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,135 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &&`, `const MR::CSharp::ExposedLayout &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java new file mode 100644 index 00000000..f8a53944 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java @@ -0,0 +1,297 @@ +package mrbind_test.mr.cs; + +/** + * Stores 10 objects: `const int`, `const float`, `int &`, `float &`, `const int &`, `const float &`, `int &&`, `float &&`, `const int &&`, `const float &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * The reference to the parameter `_4` might be preserved in the constructed object. + * The reference to the parameter `_5` might be preserved in the constructed object. + * The reference to the parameter `_6` might be preserved in the constructed object. + * The reference to the parameter `_7` might be preserved in the constructed object. + * The reference to the parameter `_8` might be preserved in the constructed object. + * The reference to the parameter `_9` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + this(__ctor_construct(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(_0, _1, _2, _3, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _4), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _5), _6, _7, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _8), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _9)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int()`. + */ + public int get_const_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float()`. + */ + public float get_const_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 4, of type `const int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref()`. + */ + public int get_const_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 5, of type `const float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref()`. + */ + public float get_const_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 6, of type `int &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 7, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 8, of type `const int &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref()`. + */ + public int get_const_int_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 9, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java new file mode 100644 index 00000000..56219490 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -0,0 +1,182 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `const int &`, `const float &&`, `const std::string &`, `const std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct()`. + */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_2, "_2")); + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _0), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _1), __str__2, mrbind_test.Ffi.end(__str__2), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref()`. + */ + public int get_const_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `const std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `const std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java new file mode 100644 index 00000000..a03badfa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `const int`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_const_int_std_string_DefaultConstruct()`. + */ + public std_tuple_const_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_std_string_ConstructFromAnother()`. + */ + public std_tuple_const_int_std_string(mrbind_test.mr.cs.std_tuple_const_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_std_string_Construct()`. + */ + public std_tuple_const_int_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_const_int()`. + */ + public int get_const_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_const_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java new file mode 100644 index 00000000..589991cc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java @@ -0,0 +1,318 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `float`, `double`, `int`, `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_float_double_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_float_double_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_float_double_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_float_double_int_int_DefaultConstruct()`. + */ + public std_tuple_float_double_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_float_double_int_int_ConstructFromAnother()`. + */ + public std_tuple_float_double_int_int(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_float_double_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_float_double_int_int_Construct()`. + */ + public std_tuple_float_double_int_int(float _0, double _1, int _2, int _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(float _0, double _1, int _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_Construct.invokeExact(_0, _1, _2, _3); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_double()`. + */ + public double get_double() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_double_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_double_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_2()`. + */ + public int get_int_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_3()`. + */ + public int get_int_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_int.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int.java new file mode 100644 index 00000000..eaaa1c75 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int.java @@ -0,0 +1,174 @@ +package mrbind_test.mr.cs; + +/** + * Stores 1 object: `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_DefaultConstruct()`. + */ + public std_tuple_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_ConstructFromAnother()`. + */ + public std_tuple_int(mrbind_test.mr.cs.std_tuple_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int other) + { + try + { + mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_int_Construct()`. + */ + public std_tuple_int(int _0) + { + this(__ctor_construct(_0), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_Construct.invokeExact(_0); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_float.java new file mode 100644 index 00000000..afed8519 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_float.java @@ -0,0 +1,222 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_float_DefaultConstruct()`. + */ + public std_tuple_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_float_ConstructFromAnother()`. + */ + public std_tuple_int_float(mrbind_test.mr.cs.std_tuple_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_float other) + { + try + { + mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_int_float_Construct()`. + */ + public std_tuple_int_float(int _0, float _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_Construct.invokeExact(_0, _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..eb36d206 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,156 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `int &`, `float &&`, `std::string &`, `std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct.invokeExact(_0, _1, mrbind_test.Ffi.ptrNonNull(_2, "_2"), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * The element 0, of type `int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_std_string.java new file mode 100644 index 00000000..179979e1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_tuple_int_std_string.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_std_string_DefaultConstruct()`. + */ + public std_tuple_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_std_string_ConstructFromAnother()`. + */ + public std_tuple_int_std_string(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + try + { + mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_std_string_Construct()`. + */ + public std_tuple_int_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..145edfc4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_Destroy()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..86b761ad --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,224 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `MR::StdUniquePtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at()`. + */ + public mrbind_test.mr.stduniqueptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_DestroyArray()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int.java b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int.java new file mode 100644 index 00000000..2a04d900 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int.java @@ -0,0 +1,196 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int_DefaultConstruct()`. + */ + public std_unique_ptr_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int_ConstructFromAnother()`. + */ + public std_unique_ptr_int(mrbind_test.mr.cs.std_unique_ptr_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_Free()`. + * + * Calls `MR_C_std_unique_ptr_int_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java new file mode 100644 index 00000000..66f64e9c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int_array_DefaultConstruct()`. + */ + public std_unique_ptr_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int_array_ConstructFromAnother()`. + */ + public std_unique_ptr_int_array(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int_array_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int_array(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int_array_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_FreeArray()`. + * + * Calls `MR_C_std_unique_ptr_int_array_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..f82d6439 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,461 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..7f7a0983 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..f2238df6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float.java new file mode 100644 index 00000000..1ed24b2d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_DefaultConstruct()`. + */ + public std_unordered_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_ConstructFromAnother()`. + */ + public std_unordered_map_int_float(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java new file mode 100644 index 00000000..719037f6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java new file mode 100644 index 00000000..8dca84d8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int_float_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..1e8f792e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,436 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..71f0330b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..f7672c58 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java new file mode 100644 index 00000000..9a58082b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java @@ -0,0 +1,433 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..fb125270 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java new file mode 100644 index 00000000..a0afe53a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..da707bac --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,315 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..484b26bc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,149 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int.java new file mode 100644 index 00000000..d0f5d4bf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int_DefaultConstruct()`. + */ + public std_unordered_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int_ConstructFromAnother()`. + */ + public std_unordered_multiset_int(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_multiset_int_ConstructFromRange()`. + */ + public std_unordered_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_unordered_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java new file mode 100644 index 00000000..783af965 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_int_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..7f807dbe --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,315 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..80193b0e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,149 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int.java new file mode 100644 index 00000000..e68840b7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int_DefaultConstruct()`. + */ + public std_unordered_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int_ConstructFromAnother()`. + */ + public std_unordered_set_int(mrbind_test.mr.cs.std_unordered_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int other) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_set_int_ConstructFromRange()`. + */ + public std_unordered_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_unordered_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java new file mode 100644 index 00000000..cbcb2b47 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_int_const_iterator(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float.java new file mode 100644 index 00000000..de28c6d9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float.java @@ -0,0 +1,313 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 2 objects: `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_DefaultConstruct()`. + */ + public std_variant_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_ConstructFromAnother()`. + */ + public std_variant_int_float(mrbind_test.mr.cs.std_variant_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float other) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_ConstructAs_int()`. + */ + public std_variant_int_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_ConstructAs_float()`. + */ + public std_variant_int_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_float.java b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_float.java new file mode 100644 index 00000000..4aa4984a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_float.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_float_DefaultConstruct()`. + */ + public std_variant_int_float_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_float_ConstructFromAnother()`. + */ + public std_variant_int_float_float(mrbind_test.mr.cs.std_variant_int_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_float other) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_int()`. + */ + public std_variant_int_float_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_float_1()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_1(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_1.invokeExact(value); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_float_1()`. + */ + public void AssignAs_float_1(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_1.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_1()`. + */ + public java.lang.Float get_float_1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_1_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_1_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java new file mode 100644 index 00000000..a24d889e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int`, `float`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_std_string_DefaultConstruct()`. + */ + public std_variant_int_float_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructFromAnother()`. + */ + public std_variant_int_float_std_string(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_std_string_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_int()`. + */ + public std_variant_int_float_std_string(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_float()`. + */ + public std_variant_int_float_std_string(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_std_string()`. + */ + public std_variant_int_float_std_string(java.lang.String value) + { + this(__ctor_constructAs_std_string(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_std_string.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_std_string()`. + */ + public void AssignAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_std_string.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java new file mode 100644 index 00000000..8b129c0c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java @@ -0,0 +1,375 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `std::monostate`, `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int_float(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_int()`. + */ + public std_variant_std_monostate_int_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_float()`. + */ + public std_variant_std_monostate_int_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java b/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java new file mode 100644 index 00000000..53b0413c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java @@ -0,0 +1,459 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 4 objects: `std::monostate`, `int`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int_float_float(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int()`. + */ + public std_variant_std_monostate_int_float_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_float_3(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3.invokeExact(value); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3()`. + */ + public void AssignAs_float_3(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_3()`. + */ + public java.lang.Float get_float_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A.java new file mode 100644 index 00000000..38686116 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A.java @@ -0,0 +1,860 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_DefaultConstruct()`. + */ + public std_vector_MR_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_ConstructFromAnother()`. + */ + public std_vector_MR_A(mrbind_test.mr.cs.std_vector_MR_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_A_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_A_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_A_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_A_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_A_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_A_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_A_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_A_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at()`. + */ + public mrbind_test.mr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at_mut()`. + */ + public mrbind_test.mr.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front()`. + */ + public mrbind_test.mr.A front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front_mut()`. + */ + public mrbind_test.mr.A front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back()`. + */ + public mrbind_test.mr.A back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back_mut()`. + */ + public mrbind_test.mr.A back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_push_back()`. + */ + public void push_back(mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_A_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert()`. + */ + public void insert(long position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_A_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java new file mode 100644 index 00000000..409b31fe --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_from_mutable()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java new file mode 100644 index 00000000..65ea4c1d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..24645982 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,854 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..36ffd607 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..329a8858 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..551e1968 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,959 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange.invokeExact(mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange()`. + */ + public void assignFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java new file mode 100644 index 00000000..2269bec7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java new file mode 100644 index 00000000..6ee3b0fe --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..23e04a5a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java @@ -0,0 +1,838 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateA_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateA_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateA value) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateA_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateA_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateA_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at()`. + */ + public mrbind_test.mr.SeparateA at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at_mut()`. + */ + public mrbind_test.mr.SeparateA at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front()`. + */ + public mrbind_test.mr.SeparateA front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front_mut()`. + */ + public mrbind_test.mr.SeparateA front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back()`. + */ + public mrbind_test.mr.SeparateA back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back_mut()`. + */ + public mrbind_test.mr.SeparateA back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateA_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java new file mode 100644 index 00000000..aec3339f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java new file mode 100644 index 00000000..3bf59bbb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..4e074dce --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java @@ -0,0 +1,838 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateB value) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at()`. + */ + public mrbind_test.mr.SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front()`. + */ + public mrbind_test.mr.SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back()`. + */ + public mrbind_test.mr.SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..1ef84a5f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java new file mode 100644 index 00000000..13b0c0a5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..3c5de01f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,695 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..c97bba96 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..4f48ab3f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..a3d8d80c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,838 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert()`. + */ + public void insert(long position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java new file mode 100644 index 00000000..f3f4e76e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java new file mode 100644 index 00000000..d483470d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..60eadc8a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,854 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..9e3ec838 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..3da632ea --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_int.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_int.java new file mode 100644 index 00000000..b625a6fa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_int.java @@ -0,0 +1,939 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_DefaultConstruct()`. + */ + public std_vector_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_ConstructFromAnother()`. + */ + public std_vector_int(mrbind_test.mr.cs.std_vector_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_int_ConstructFromRange()`. + */ + public std_vector_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_int_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_int_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_int_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_vector_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_int_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_begin()`. + */ + public mrbind_test.mr.cs.std_vector_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_end()`. + */ + public mrbind_test.mr.cs.std_vector_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_int_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_int_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java new file mode 100644 index 00000000..b6599087 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_const_iterator_DefaultConstruct()`. + */ + public std_vector_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_const_iterator_ConstructFromAnother()`. + */ + public std_vector_int_const_iterator(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_int_const_iterator_from_mutable()`. + */ + public std_vector_int_const_iterator(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_int_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_int_iterator.java new file mode 100644 index 00000000..ee3bf5ef --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_int_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_iterator_DefaultConstruct()`. + */ + public std_vector_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_iterator_ConstructFromAnother()`. + */ + public std_vector_int_iterator(mrbind_test.mr.cs.std_vector_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_long.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_long.java new file mode 100644 index 00000000..44ee6632 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_long.java @@ -0,0 +1,939 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_long extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_long(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_long::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_long_DefaultConstruct()`. + */ + public std_vector_long() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_long_ConstructFromAnother()`. + */ + public std_vector_long(mrbind_test.mr.cs.std_vector_long other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_long other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_long_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_long other) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_long_ConstructFromRange()`. Some types are raw C types, see the C bindings for the details. + */ + public std_vector_long(java.lang.foreign.MemorySegment ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.foreign.MemorySegment ptr, long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_ConstructFromRange.invokeExact(ptr, size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_long_AssignFromRange()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFromRange(java.lang.foreign.MemorySegment ptr, long size) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_AssignFromRange.invokeExact(rawPointer(), ptr, size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_long_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_long_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_long_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_long_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_long_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_long_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_long_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_long_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Long)mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Long)mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_vector_long_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_long_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_long_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_long_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_long_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_long_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_long_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_long_iterator position) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_long_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_long_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_long_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_long_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_begin()`. + */ + public mrbind_test.mr.cs.std_vector_long_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_long_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_long_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_long_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_long_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_long_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_long_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_long_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_end()`. + */ + public mrbind_test.mr.cs.std_vector_long_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_long_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_long_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_long_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_long_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_long_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_long_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_long_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_long_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_long_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_long_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_long_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_long_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_long_const_iterator.java new file mode 100644 index 00000000..11323cde --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_long_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_long`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_long_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_long_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_long_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_long_const_iterator_DefaultConstruct()`. + */ + public std_vector_long_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_long_const_iterator_ConstructFromAnother()`. + */ + public std_vector_long_const_iterator(mrbind_test.mr.cs.std_vector_long_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_long_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_long_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_long_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_long_const_iterator_from_mutable()`. + */ + public std_vector_long_const_iterator(mrbind_test.mr.cs.std_vector_long_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_long_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_long_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_long_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_long_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_long_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_long_iterator.java new file mode 100644 index 00000000..9d57f098 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_long_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_long`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_long_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_long_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_long_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_long_iterator_DefaultConstruct()`. + */ + public std_vector_long_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_long_iterator_ConstructFromAnother()`. + */ + public std_vector_long_iterator(mrbind_test.mr.cs.std_vector_long_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_long_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_long_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_long_iterator other) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_long_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_long_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_long_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_long_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_long.H0.MR_C_std_vector_long_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java new file mode 100644 index 00000000..c1dbdebe --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java @@ -0,0 +1,860 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_expected_int_std_string value) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_at()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_at_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_front()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_front_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_back()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_back_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_begin()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_end()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java new file mode 100644 index 00000000..99c25263 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_std_expected_int_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string_const_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable()`. + */ + public std_vector_std_expected_int_std_string_const_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java new file mode 100644 index 00000000..1839d460 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_std_expected_int_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..b55ed1bc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,838 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB value) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..90b5a6fd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java new file mode 100644 index 00000000..b6c828db --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long.java new file mode 100644 index 00000000..645e9631 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long.java @@ -0,0 +1,943 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_unsigned_long extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_unsigned_long(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_unsigned_long::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_unsigned_long_DefaultConstruct()`. + */ + public std_vector_unsigned_long() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_unsigned_long_ConstructFromAnother()`. + */ + public std_vector_unsigned_long(mrbind_test.mr.cs.std_vector_unsigned_long other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long other) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_unsigned_long_ConstructFromRange()`. Some types are raw C types, see the C bindings for the details. + */ + public std_vector_unsigned_long(java.lang.foreign.MemorySegment ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.foreign.MemorySegment ptr, long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_ConstructFromRange.invokeExact(ptr, size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_unsigned_long_AssignFromRange()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFromRange(java.lang.foreign.MemorySegment ptr, long size) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_AssignFromRange.invokeExact(rawPointer(), ptr, size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_unsigned_long_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_unsigned_long_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_unsigned_long_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_unsigned_long_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_unsigned_long_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_unsigned_long_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_unsigned_long_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_unsigned_long_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Long)mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Long)mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_unsigned_long_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_unsigned_long_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_unsigned_long_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_unsigned_long_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_unsigned_long_iterator position) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_unsigned_long_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_begin()`. + */ + public mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_unsigned_long_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_unsigned_long_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_unsigned_long_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_unsigned_long_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_unsigned_long_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_end()`. + */ + public mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_unsigned_long_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_unsigned_long_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_unsigned_long_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_unsigned_long_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_unsigned_long_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_unsigned_long_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_unsigned_long_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_unsigned_long_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_const_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_const_iterator.java new file mode 100644 index 00000000..8ccf101f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_const_iterator.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_unsigned_long`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_unsigned_long_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_unsigned_long_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_unsigned_long_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_DefaultConstruct()`. + */ + public std_vector_unsigned_long_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_ConstructFromAnother()`. + */ + public std_vector_unsigned_long_const_iterator(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_from_mutable()`. + */ + public std_vector_unsigned_long_const_iterator(mrbind_test.mr.cs.std_vector_unsigned_long_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_unsigned_long_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_unsigned_long_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_iterator.java b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_iterator.java new file mode 100644 index 00000000..f2615f3e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/cs/std_vector_unsigned_long_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_unsigned_long`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_unsigned_long_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_unsigned_long_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_unsigned_long_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_DefaultConstruct()`. + */ + public std_vector_unsigned_long_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_ConstructFromAnother()`. + */ + public std_vector_unsigned_long_iterator(mrbind_test.mr.cs.std_vector_unsigned_long_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_unsigned_long_iterator other) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_unsigned_long_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_unsigned_long.H0.MR_C_std_vector_unsigned_long_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/A.java b/test/output_java/src/mrbind_test/mr/csharp/A.java new file mode 100644 index 00000000..6114e161 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/A.java @@ -0,0 +1,259 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::A`. + * Derived classes: + * Virtual: + * `MR::CSharp::C` + * Direct: (non-virtual) + * `MR::CSharp::B` + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.csharp.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.A assignFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::foo`. + * + * Calls `MR_CSharp_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::bar`. + * + * Calls `MR_CSharp_A_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::static_foo`. + * + * Calls `MR_CSharp_A_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::static_bar`. + * + * Calls `MR_CSharp_A_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_foo`. + * + * Calls `MR_CSharp_A_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_bar`. + * + * Calls `MR_CSharp_A_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::refs`. + * + * Calls `MR_CSharp_A_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/AmbiguousTemplates.java b/test/output_java/src/mrbind_test/mr/csharp/AmbiguousTemplates.java new file mode 100644 index 00000000..c2eafab4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/AmbiguousTemplates.java @@ -0,0 +1,260 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::AmbiguousTemplates`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class AmbiguousTemplates extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public AmbiguousTemplates(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? AmbiguousTemplates::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_AmbiguousTemplates_DefaultConstruct()`. + */ + public AmbiguousTemplates() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::AmbiguousTemplates::AmbiguousTemplates`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_AmbiguousTemplates_ConstructFromAnother()`. + */ + public AmbiguousTemplates(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_AmbiguousTemplates_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.AmbiguousTemplates assignFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.AmbiguousTemplates(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_int()`. + */ + public void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_float()`. + */ + public void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_int()`. + */ + public int template_b_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_float()`. + */ + public float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_int()`. + */ + public void template_c_int() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_float()`. + */ + public void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::instantiate`. + * + * Calls `MR_CSharp_AmbiguousTemplates_instantiate()`. + */ + public void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_instantiate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java new file mode 100644 index 00000000..99d38d46 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,466 @@ +package mrbind_test.mr.csharp; + +/** + * Test various array members. + * Generated from class `MR::CSharp::ArrayMembers`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ArrayMembers extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ArrayMembers(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ArrayMembers::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ArrayMembers_DefaultConstruct()`. + */ + public ArrayMembers() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ArrayMembers::ArrayMembers`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ArrayMembers_ConstructFromAnother()`. + */ + public ArrayMembers(mrbind_test.mr.csharp.ArrayMembers _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ArrayMembers _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * + * Calls `MR_CSharp_ArrayMembers_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ia()`. + */ + public int ia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ia()`. + */ + public static long iaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `iaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_iaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment iaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `iaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_iaa()`. + */ + public static long iaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ci`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ci()`. + */ + public int ci() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cia()`. + */ + public int cia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `cia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_cia()`. + */ + public static long ciaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ciaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ciaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ciaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ciaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ciaa()`. + */ + public static long ciaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_ArrayMembers_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `sa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_sa()`. + */ + public mrbind_test.mr.cs.std_string sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `sa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_sa()`. + */ + public static long saSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * std::string saa[3][4]; // The C generator doesn't support those yet. We'd need to expose them as flat arrays, with N size getters, I think? + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cs`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cs()`. + */ + public mrbind_test.mr.cs.std_string cs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `csa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_csa()`. + */ + public mrbind_test.mr.cs.std_string csa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `csa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_csa()`. + */ + public static long csaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/B.java b/test/output_java/src/mrbind_test/mr/csharp/B.java new file mode 100644 index 00000000..379d564a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,278 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.csharp.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * + * Calls `MR_CSharp_B_Construct()`. + */ + public B(int a, int b) + { + this(__ctor_construct(a, b), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int a, int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Construct.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_B_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::B::foo`. + * + * Calls `MR_CSharp_B_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::bar`. + * + * Calls `MR_CSharp_B_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::static_foo`. + * + * Calls `MR_CSharp_B_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::static_bar`. + * + * Calls `MR_CSharp_B_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::virtual_foo`. + * + * Calls `MR_CSharp_B_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::virtual_bar`. + * + * Calls `MR_CSharp_B_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::refs`. + * + * Calls `MR_CSharp_B_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/C.java b/test/output_java/src/mrbind_test/mr/csharp/C.java new file mode 100644 index 00000000..53d0e96d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,254 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::C`. + * Base classes: + * Virtual: + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.csharp.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_C_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::C::foo`. + * + * Calls `MR_CSharp_C_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::bar`. + * + * Calls `MR_CSharp_C_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::static_foo`. + * + * Calls `MR_CSharp_C_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::C::static_bar`. + * + * Calls `MR_CSharp_C_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::C::virtual_foo`. + * + * Calls `MR_CSharp_C_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::virtual_bar`. + * + * Calls `MR_CSharp_C_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::refs`. + * + * Calls `MR_CSharp_C_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/CallOp.java b/test/output_java/src/mrbind_test/mr/csharp/CallOp.java new file mode 100644 index 00000000..005fdf0a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/CallOp.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.csharp; + +/** + * Test the call operator, since it can have an unusual amount of arguments. + * Not testing `[]` here to be able to run the tests on older C++. + * Generated from class `MR::CSharp::CallOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CallOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CallOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CallOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_CallOp_DefaultConstruct()`. + */ + public CallOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::CallOp::CallOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_CallOp_ConstructFromAnother()`. + */ + public CallOp(mrbind_test.mr.csharp.CallOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_CallOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.CallOp assignFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.CallOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_0()`. + */ + public void call_0() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_3()`. + */ + public int call_3(int _1, int _2, int _3) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_3.invokeExact(rawPointer(), _1, _2, _3); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java new file mode 100644 index 00000000..2c143061 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersBool`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersBool extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersBool::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersBool::ClassMemberPointersBool`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFromAnother()`. + */ + public ClassMemberPointersBool(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersBool` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sb()`. + */ + public static void setSb(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sd()`. + */ + public static boolean sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_b()`. + */ + public void setB(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_d()`. + */ + public boolean d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java new file mode 100644 index 00000000..3ddd0e89 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,348 @@ +package mrbind_test.mr.csharp; + +/** + * Class fields of pointer types: + * Generated from class `MR::CSharp::ClassMemberPointersClass`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersClass extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersClass(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersClass::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersClass::ClassMemberPointersClass`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFromAnother()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersClass` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFrom()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sc()`. + */ + public static mrbind_test.mr.csharp.A sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sd()`. + */ + public static mrbind_test.mr.csharp.A sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_c()`. + */ + public mrbind_test.mr.csharp.A c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_d()`. + */ + public mrbind_test.mr.csharp.A d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java new file mode 100644 index 00000000..12f9d215 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,347 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersExposed`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersExposed extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersExposed(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersExposed::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersExposed::ClassMemberPointersExposed`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersExposed` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFrom()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sc()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sd()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_c()`. + */ + public mrbind_test.mr.csharp.ExposedLayout c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_d()`. + */ + public mrbind_test.mr.csharp.ExposedLayout d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java new file mode 100644 index 00000000..89f39a77 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersUshort`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersUshort extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersUshort::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersUshort::ClassMemberPointersUshort`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother()`. + */ + public ClassMemberPointersUshort(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersUshort` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, d)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sb()`. + */ + public static void setSb(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sd()`. + */ + public static short sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_b()`. + */ + public void setB(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_d()`. + */ + public short d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java b/test/output_java/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java new file mode 100644 index 00000000..0d2b8b91 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java @@ -0,0 +1,256 @@ +package mrbind_test.mr.csharp; + +/** + * Test that we don't produce the const and non-const overloads of the same function under the same name in C#, as that would be a compilation error in C#. + * Generated from class `MR::CSharp::ConstNonconstConflicts`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConstNonconstConflicts extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConstNonconstConflicts");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConstNonconstConflicts(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConstNonconstConflicts copy() {return new ConstNonconstConflicts(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConstNonconstConflicts other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_int()`. + */ + public void foo(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_float()`. + */ + public void foo(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_char()`. + */ + public void foo_mut_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_char()`. + */ + public void foo_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_const_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int()`. + */ + public int opDiv_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int()`. + */ + public int opDiv_const_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ConstNonconstConflicts() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtor.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtor.java new file mode 100644 index 00000000..e1e67bea --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtor.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion constructors. Right now we only provide conversion operators for implicit ones, + * because I have no idea when the explicit ones could be useful. + * Generated from class `MR::CSharp::ConvCtor`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtor extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtor(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtor::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtor_DefaultConstruct()`. + */ + public ConvCtor() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtor_ConstructFromAnother()`. + */ + public ConvCtor(mrbind_test.mr.csharp.ConvCtor _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_int()`. + */ + public ConvCtor(int _1) + { + this(__ctor_construct_1_int(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_int()`. + */ + public ConvCtor(int _1, int _2) + { + this(__ctor_construct_2_int(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_int(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_short()`. + */ + public ConvCtor(short _1, java.lang.Integer _2) + { + this(__ctor_construct_2_short(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_short(short _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_short.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_float()`. + */ + public ConvCtor(float _1) + { + this(__ctor_construct_1_float(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_float(float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_float()`. + */ + public ConvCtor(float _1, float _2) + { + this(__ctor_construct_2_float(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_float(float _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtor::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtor_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtor assignFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtor(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java new file mode 100644 index 00000000..d557d73e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.csharp; + +/** + * A sad class that's copyable but not movable. + * This can often happen if you have a user-provided destructor. + * Generated from class `MR::CSharp::ConvCtorCopyButNoMove`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorCopyButNoMove extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorCopyButNoMove(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorCopyButNoMove::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother()`. + */ + public ConvCtorCopyButNoMove(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_Construct()`. + */ + public ConvCtorCopyButNoMove(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorCopyButNoMove::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorCopyButNoMove assignFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorCopyButNoMove(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorExposed.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorExposed.java new file mode 100644 index 00000000..634606c7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorExposed.java @@ -0,0 +1,55 @@ +package mrbind_test.mr.csharp; + +/** + * A converting ctor in an exposed struct. + * Generated from class `MR::CSharp::ConvCtorExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConvCtorExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConvCtorExposed copy() {return new ConvCtorExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConvCtorExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from constructor `MR::CSharp::ConvCtorExposed::ConvCtorExposed`. + * + * Calls `MR_CSharp_ConvCtorExposed_Construct()`. + */ + public ConvCtorExposed(int _1) + { + super(__ctor_construct(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorExposed_Construct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public ConvCtorExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java new file mode 100644 index 00000000..a773de34 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java @@ -0,0 +1,129 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a non-trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorNonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_DefaultConstruct()`. + */ + public ConvCtorNonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother()`. + */ + public ConvCtorNonTrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_Construct()`. + */ + public ConvCtorNonTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java new file mode 100644 index 00000000..6a486e80 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.csharp; + +/** + * A non-trivial move-only class with a converting ctor. + * Here we test that our converting constructors injected into `_ByValue_...` don't attempt to copy the class. + * Generated from class `MR::CSharp::ConvCtorNonTrivialRestricted`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivialRestricted extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivialRestricted(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivialRestricted::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother()`. + */ + public ConvCtorNonTrivialRestricted(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_Construct()`. + */ + public ConvCtorNonTrivialRestricted(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivialRestricted::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorTrivial.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorTrivial.java new file mode 100644 index 00000000..310545d4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorTrivial.java @@ -0,0 +1,129 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorTrivial_DefaultConstruct()`. + */ + public ConvCtorTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorTrivial_ConstructFromAnother()`. + */ + public ConvCtorTrivial(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * + * Calls `MR_CSharp_ConvCtorTrivial_Construct()`. + */ + public ConvCtorTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java new file mode 100644 index 00000000..b7177555 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Test that the default argument of the parameter of a converting constructor is stripped when rewriting it as a conversion operator. + * Generated from class `MR::CSharp::ConvCtorWithDefArg`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorWithDefArg extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorWithDefArg(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorWithDefArg::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_Construct()`. + */ + public ConvCtorWithDefArg(java.lang.Integer _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Construct.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother()`. + */ + public ConvCtorWithDefArg(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorWithDefArg::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorWithDefArg assignFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorWithDefArg(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvOp.java b/test/output_java/src/mrbind_test/mr/csharp/ConvOp.java new file mode 100644 index 00000000..70ab16ca --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvOp.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators. We preserve explicit-ness. + * Generated from class `MR::CSharp::ConvOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOp_DefaultConstruct()`. + */ + public ConvOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOp::ConvOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOp_ConstructFromAnother()`. + */ + public ConvOp(mrbind_test.mr.csharp.ConvOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator int`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator float`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_float()`. + */ + public float convertTo_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOp assignFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ConvOpToRef.java b/test/output_java/src/mrbind_test/mr/csharp/ConvOpToRef.java new file mode 100644 index 00000000..af052049 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ConvOpToRef.java @@ -0,0 +1,177 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators to references. + * Generated from class `MR::CSharp::ConvOpToRef`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOpToRef extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOpToRef(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOpToRef::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOpToRef_DefaultConstruct()`. + */ + public ConvOpToRef() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOpToRef::ConvOpToRef`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOpToRef_ConstructFromAnother()`. + */ + public ConvOpToRef(mrbind_test.mr.csharp.ConvOpToRef _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not to a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator int`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator float &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference, explicit. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator unsigned short &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_unsigned_short_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOpToRef::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOpToRef_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOpToRef assignFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOpToRef(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/D.java b/test/output_java/src/mrbind_test/mr/csharp/D.java new file mode 100644 index 00000000..6be932e9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/D.java @@ -0,0 +1,152 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::D`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.csharp.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_D_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.D assignFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::d1`. + * + * Calls `MR_CSharp_D_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::D::d2`. + * + * Calls `MR_CSharp_D_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/E.java b/test/output_java/src/mrbind_test/mr/csharp/E.java new file mode 100644 index 00000000..bb4e4e83 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/E.java @@ -0,0 +1,153 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::E`. + * Derived classes: + * Virtual: + * `MR::CSharp::G` + * Direct: (non-virtual) + * `MR::CSharp::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.csharp.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_E_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.E assignFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::e1`. + * + * Calls `MR_CSharp_E_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::E::e2`. + * + * Calls `MR_CSharp_E_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/E1.java b/test/output_java/src/mrbind_test/mr/csharp/E1.java new file mode 100644 index 00000000..a25ccc05 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/E1.java @@ -0,0 +1,45 @@ +package mrbind_test.mr.csharp; + +/** + * Enum comment. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E1 +{ + public final int value; + + public E1(int value) {this.value = value;} + + /** + * A + */ + public static final E1 a = new E1(10); + /** + * B + */ + public static final E1 b = new E1(20); + /** + * C + */ + public static final E1 c = new E1(30); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E1 of(int value) + { + if (value == a.value) return a; + if (value == b.value) return b; + if (value == c.value) return c; + return new E1(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E1 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + if (value == c.value) return "c"; + return "E1(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/E2.java b/test/output_java/src/mrbind_test/mr/csharp/E2.java new file mode 100644 index 00000000..06d50b54 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/E2.java @@ -0,0 +1,34 @@ +package mrbind_test.mr.csharp; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final boolean value; + + public E2(boolean value) {this.value = value;} + + /** + * < Test a same-line documentation comment. Add some >weird< & 'characters". + */ + public static final E2 a = new E2(false); + public static final E2 b = new E2(true); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(boolean value) + { + if (value == a.value) return a; + if (value == b.value) return b; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return value ? 1 : 0;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/EqualityA.java b/test/output_java/src/mrbind_test/mr/csharp/EqualityA.java new file mode 100644 index 00000000..ad1d667e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/EqualityA.java @@ -0,0 +1,175 @@ +package mrbind_test.mr.csharp; + +/** + * Test equality comparison. + * Generated from class `MR::CSharp::EqualityA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityA_DefaultConstruct()`. + */ + public EqualityA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityA::EqualityA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityA_ConstructFromAnother()`. + */ + public EqualityA(mrbind_test.mr.csharp.EqualityA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityA assignFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA_int()`. + */ + public boolean opEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityA_int()`. + */ + public boolean opNotEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/EqualityB.java b/test/output_java/src/mrbind_test/mr/csharp/EqualityB.java new file mode 100644 index 00000000..430f175b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/EqualityB.java @@ -0,0 +1,175 @@ +package mrbind_test.mr.csharp; + +/** + * Return type isn't `bool`. + * Generated from class `MR::CSharp::EqualityB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityB_DefaultConstruct()`. + */ + public EqualityB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityB::EqualityB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityB_ConstructFromAnother()`. + */ + public EqualityB(mrbind_test.mr.csharp.EqualityB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityB assignFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB_int()`. + */ + public int opEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityB_int()`. + */ + public int opNotEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB()`. + */ + public int opEqual(mrbind_test.mr.csharp.EqualityB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/EqualityC.java b/test/output_java/src/mrbind_test/mr/csharp/EqualityC.java new file mode 100644 index 00000000..d0c4f3c0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/EqualityC.java @@ -0,0 +1,172 @@ +package mrbind_test.mr.csharp; + +/** + * Return type is `void`. + * Generated from class `MR::CSharp::EqualityC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityC_DefaultConstruct()`. + */ + public EqualityC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityC::EqualityC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityC_ConstructFromAnother()`. + */ + public EqualityC(mrbind_test.mr.csharp.EqualityC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityC assignFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC_int()`. + */ + public void opEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityC_int()`. + */ + public void opNotEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC()`. + */ + public void opEqual(mrbind_test.mr.csharp.EqualityC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/EqualityD.java b/test/output_java/src/mrbind_test/mr/csharp/EqualityD.java new file mode 100644 index 00000000..678dc30b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/EqualityD.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and isn't a managed type. + * Generated from class `MR::CSharp::EqualityD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityD_DefaultConstruct()`. + */ + public EqualityD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityD::EqualityD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityD_ConstructFromAnother()`. + */ + public EqualityD(mrbind_test.mr.csharp.EqualityD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityD assignFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityD_const_int_ptr()`. + */ + public boolean opEqual(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityD_const_int_ptr.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/EqualityE.java b/test/output_java/src/mrbind_test/mr/csharp/EqualityE.java new file mode 100644 index 00000000..e7fc2ecf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/EqualityE.java @@ -0,0 +1,129 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and is a managed type. + * Generated from class `MR::CSharp::EqualityE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityE_DefaultConstruct()`. + */ + public EqualityE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityE::EqualityE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityE_ConstructFromAnother()`. + */ + public EqualityE(mrbind_test.mr.csharp.EqualityE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityE assignFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityD _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayout.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayout.java new file mode 100644 index 00000000..2847016a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayout.java @@ -0,0 +1,282 @@ +package mrbind_test.mr.csharp; + +/** + * Exposed structs: + * Generated from class `MR::CSharp::ExposedLayout`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayout extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayout");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayout(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayout copy() {return new ExposedLayout(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayout other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayout::foo`. + * + * Calls `MR_CSharp_ExposedLayout_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::bar`. + * + * Calls `MR_CSharp_ExposedLayout_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::blah`. + * + * Calls `MR_CSharp_ExposedLayout_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_blah.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayout::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayout()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayout_ref_int()`. + */ + public int opAdd_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Test how returning references to an exposed struct works, since C# overloaded operators can't return `ref`. + * Note that this operator must be `const` to test this correctly, since we turn non-const operators in exposed structs into functions. + * Generated from method `MR::CSharp::ExposedLayout::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayout_int()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opMul(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayout_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_const_MR_CSharp_ExposedLayout_ref_int()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opAdd_const_ref_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_const_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayout_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayout_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ExposedLayout() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java new file mode 100644 index 00000000..5554c8d3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -0,0 +1,85 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ExposedLayoutB`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutB extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutB");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutB(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutB copy() {return new ExposedLayoutB(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutB other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Some random ctor. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_2()`. + */ + public ExposedLayoutB(int _1, int _2) + { + super(__ctor_construct_2(_1, _2), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_2.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This gets a lifetime annotation from `--infer-lifetime-constructors`, but it should be a no-op in an exposed struct. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_1()`. + */ + public ExposedLayoutB(mrbind_test.mr.csharp.A _1) + { + super(__ctor_construct_1(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr.csharp.A _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutB() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutC.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutC.java new file mode 100644 index 00000000..6f97ef2f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutC.java @@ -0,0 +1,31 @@ +package mrbind_test.mr.csharp; + +/** + * Just a simple exposed struct to test other things. + * Generated from class `MR::CSharp::ExposedLayoutC`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutC extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutC");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutC(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutC copy() {return new ExposedLayoutC(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutC other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public ExposedLayoutC() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java new file mode 100644 index 00000000..d9379578 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -0,0 +1,305 @@ +package mrbind_test.mr.csharp; + +/** + * This one is backed by a shared pointer. + * Generated from class `MR::CSharp::ExposedLayoutSh`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutSh extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayoutSh");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutSh(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutSh copy() {return new ExposedLayoutSh(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutSh other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::foo`. + * + * Calls `MR_CSharp_ExposedLayoutSh_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::bar`. + * + * Calls `MR_CSharp_ExposedLayoutSh_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::blah`. + * + * Calls `MR_CSharp_ExposedLayoutSh_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayoutSh()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayoutSh_int()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_add_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayoutSh_int()`. + */ + public int opMul(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_mul_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * While we're at it, test comparison against another exposed struct, since this is apparently non-trivial. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And against itself, too. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutSh() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/F.java b/test/output_java/src/mrbind_test/mr/csharp/F.java new file mode 100644 index 00000000..55fe7f3b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,344 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * `MR::CSharp::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.csharp.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_F_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::F::foo`. + * + * Calls `MR_CSharp_F_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::bar`. + * + * Calls `MR_CSharp_F_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::static_foo`. + * + * Calls `MR_CSharp_F_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::F::static_bar`. + * + * Calls `MR_CSharp_F_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::F::virtual_foo`. + * + * Calls `MR_CSharp_F_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::virtual_bar`. + * + * Calls `MR_CSharp_F_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::refs`. + * + * Calls `MR_CSharp_F_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::d1`. + * + * Calls `MR_CSharp_F_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::d2`. + * + * Calls `MR_CSharp_F_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::e1`. + * + * Calls `MR_CSharp_F_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::e2`. + * + * Calls `MR_CSharp_F_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/Functions.java b/test/output_java/src/mrbind_test/mr/csharp/Functions.java new file mode 100644 index 00000000..9f1b5361 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7433 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CSharp::foo`. + * + * Calls `MR_CSharp_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int`. + * + * Calls `MR_CSharp_test_int()`. + */ + public static int test_int(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Marking this `noexcept` for testing. + * Generated from function `MR::CSharp::test_bool`. + * + * Calls `MR_CSharp_test_bool()`. + */ + public static boolean test_bool(boolean a, java.lang.Boolean b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref`. + * + * Calls `MR_CSharp_test_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void test_bool_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref2`. + * + * Calls `MR_CSharp_test_bool_ref2()`. Some types are raw C types, see the C bindings for the details. + */ + public static int test_bool_ref2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_bool_ref`. + * + * Calls `MR_CSharp_get_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment get_bool_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_get_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::print_bool_ref`. + * + * Calls `MR_CSharp_print_bool_ref()`. + */ + public static void print_bool_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_print_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_cref`. + * + * Calls `MR_CSharp_test_bool_cref()`. + */ + public static boolean test_bool_cref(boolean _1, java.lang.Boolean _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _1), (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _2))); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ref`. + * + * Calls `MR_CSharp_test_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cref`. + * + * Calls `MR_CSharp_test_int_cref()`. + */ + public static int test_int_cref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_rref`. + * + * Calls `MR_CSharp_test_int_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_crref`. + * + * Calls `MR_CSharp_test_int_crref()`. + */ + public static int test_int_crref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ptr`. + * + * Calls `MR_CSharp_test_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cptr`. + * + * Calls `MR_CSharp_test_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Integer test_int_cptr(java.lang.Integer a, java.lang.Integer b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b)), c); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort`. + * + * Calls `MR_CSharp_test_ushort()`. + */ + public static short test_ushort(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + short __ret = (short)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ref`. + * + * Calls `MR_CSharp_test_ushort_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cref`. + * + * Calls `MR_CSharp_test_ushort_cref()`. + */ + public static short test_ushort_cref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_rref`. + * + * Calls `MR_CSharp_test_ushort_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_crref`. + * + * Calls `MR_CSharp_test_ushort_crref()`. + */ + public static short test_ushort_crref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ptr`. + * + * Calls `MR_CSharp_test_ushort_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cptr`. + * + * Calls `MR_CSharp_test_ushort_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Short test_ushort_cptr(java.lang.Short a, java.lang.Short b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Short)__ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_int`. + * + * Calls `MR_CSharp_test_constness_int()`. + */ + public static int test_constness_int(int _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_int.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_str`. + * + * Calls `MR_CSharp_test_constness_str()`. + */ + public static mrbind_test.mr.cs.std_string test_constness_str(java.lang.String _1, java.lang.String _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, _2); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_str.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1), __str__2, mrbind_test.Ffi.end(__str__2)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how we adjust keywords in parameter names. + * \param params blah + * @param params blah + * `params` 'params' "params" params huhparams paramshuh \p params \c params @p params @c params \A params @A params + * In this comment, only quoted and `\param ...` uses are adjusted, and not standalone occurences of the word (even if it's a separate word, let alone if it's just a part of a word). + * `\c ...` and `\p ...` are handled, but unknown tags like `\A ...` are not. + * This is also handled, naturally, because we handle quotes. + * Generated from function `MR::CSharp::test_keyword_in_param_name`. + * + * Calls `MR_CSharp_test_keyword_in_param_name()`. + */ + public static void test_keyword_in_param_name(int params) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_keyword_in_param_name.invokeExact(params); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E1.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_crref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E1_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cptr(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value)), c); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E2.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E2.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_crref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cptr(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value)), c); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial`. + * + * Calls `MR_CSharp_test_class_trivial()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ref`. + * + * Calls `MR_CSharp_test_class_trivial_ref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cref`. + * + * Calls `MR_CSharp_test_class_trivial_cref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_rref`. + * + * Calls `MR_CSharp_test_class_trivial_rref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_rref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_crref`. + * + * Calls `MR_CSharp_test_class_trivial_crref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_crref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ptr`. + * + * Calls `MR_CSharp_test_class_trivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cptr`. + * + * Calls `MR_CSharp_test_class_trivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial`. + * + * Calls `MR_CSharp_test_class_nontrivial()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ref`. + * + * Calls `MR_CSharp_test_class_nontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cref`. + * + * Calls `MR_CSharp_test_class_nontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_rref`. + * + * Calls `MR_CSharp_test_class_nontrivial_rref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_rref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_crref`. + * + * Calls `MR_CSharp_test_class_nontrivial_crref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_crref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_void_ptr`. + * + * Calls `MR_CSharp_test_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_void_cptr`. + * + * Calls `MR_CSharp_test_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::mark_se_as_shared`. + * + * Calls `MR_CSharp_mark_se_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE mark_se_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_se_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Poking a shared pointer type for a single class causes `std::shared_ptr` to be instantiated for the entire hierarchy (when `--bind-shared-ptr-virally`, which is required for `C#`). + * Generated from function `MR::CSharp::test_shptr`. + * + * Calls `MR_CSharp_test_shptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ref`. + * + * Calls `MR_CSharp_test_shptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cref`. + * + * Calls `MR_CSharp_test_shptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_rref`. + * + * Calls `MR_CSharp_test_shptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_rref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_crref`. + * + * Calls `MR_CSharp_test_shptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_crref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ptr`. + * + * Calls `MR_CSharp_test_shptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cptr`. + * + * Calls `MR_CSharp_test_shptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr`. + * + * Calls `MR_CSharp_test_shcptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ref`. + * + * Calls `MR_CSharp_test_shcptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cref`. + * + * Calls `MR_CSharp_test_shcptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_rref`. + * + * Calls `MR_CSharp_test_shcptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_rref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_crref`. + * + * Calls `MR_CSharp_test_shcptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_crref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ptr`. + * + * Calls `MR_CSharp_test_shcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cptr`. + * + * Calls `MR_CSharp_test_shcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::mark_sg_as_shared`. + * + * Calls `MR_CSharp_mark_sg_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG mark_sg_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_sg_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string`. + * + * Calls `MR_CSharp_test_string()`. + */ + public static mrbind_test.mr.cs.std_string test_string(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ref`. + * + * Calls `MR_CSharp_test_string_ref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_ref(mrbind_test.mr.cs.std_string a, mrbind_test.mr.cs.std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cref`. + * + * Calls `MR_CSharp_test_string_cref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_rref`. + * + * Calls `MR_CSharp_test_string_rref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_crref`. + * + * Calls `MR_CSharp_test_string_crref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ptr`. + * + * Calls `MR_CSharp_test_string_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_ptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cptr`. + * + * Calls `MR_CSharp_test_string_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_cptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview`. + * + * Calls `MR_CSharp_test_stringview()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ref`. + * + * Calls `MR_CSharp_test_stringview_ref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ref(mrbind_test.mr.cs.std_string_view a, mrbind_test.mr.cs.std_string_view b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cref`. + * + * Calls `MR_CSharp_test_stringview_cref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_rref`. + * + * Calls `MR_CSharp_test_stringview_rref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_crref`. + * + * Calls `MR_CSharp_test_stringview_crref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ptr`. + * + * Calls `MR_CSharp_test_stringview_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cptr`. + * + * Calls `MR_CSharp_test_stringview_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath`. + * + * Calls `MR_CSharp_test_fspath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ref`. + * + * Calls `MR_CSharp_test_fspath_ref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ref(mrbind_test.mr.cs.std_filesystem_path a, mrbind_test.mr.cs.std_filesystem_path b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cref`. + * + * Calls `MR_CSharp_test_fspath_cref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_rref`. + * + * Calls `MR_CSharp_test_fspath_rref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_crref`. + * + * Calls `MR_CSharp_test_fspath_crref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ptr`. + * + * Calls `MR_CSharp_test_fspath_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cptr`. + * + * Calls `MR_CSharp_test_fspath_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsA_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsA _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsA_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsB_int()`. + */ + public static void opAdd(mrbind_test.mr.csharp.StaticOpsLhsB _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsB_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsC_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsC _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsC_int.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_1, "_1").release(), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsD_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsD _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsD_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsE_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsE _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsE_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsF_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsF _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsF_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsG_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsG _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsG_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsH_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsH _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsH_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsA()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsA _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsA.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsB()`. + */ + public static void opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsB _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsB.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsC()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsC _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsC.invokeExact(_1, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_2, "_2").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsD()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsD _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsD.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsE()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsE _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsE.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsF()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsF _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsF.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsG()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsG _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsG.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsH()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsH _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsH.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Fails to inject, becomes a free function. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsEnum_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsEnum _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsEnum_int.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Gets injected into the lhs by default. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsMixedLhs _1, mrbind_test.mr.csharp.StaticOpsMixedRhs _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_float()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonTrivialClassOps _1, float _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonTrivialClassOps_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_float_MR_CSharp_NonTrivialClassOps()`. + */ + public static int opAdd(float _1, mrbind_test.mr.csharp.NonTrivialClassOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_float_MR_CSharp_NonTrivialClassOps.invokeExact(_1, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonCopyableClassByValueOps _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.NonCopyableClassByValueOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial`. + * + * Calls `MR_CSharp_test_class_convtrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ref`. + * + * Calls `MR_CSharp_test_class_convtrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cref`. + * + * Calls `MR_CSharp_test_class_convtrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial`. + * + * Calls `MR_CSharp_test_class_convnontrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int_MR_CSharp_ExposedLayout()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int_MR_CSharp_ExposedLayout()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int_MR_CSharp_ExposedLayout()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayout()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayout.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.ExposedLayout(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_rref`. + * + * Calls `MR_CSharp_test_exposed_rref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_rref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_crref`. + * + * Calls `MR_CSharp_test_exposed_crref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_crref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * This broke at one point, so testing it too. + * Generated from function `MR::CSharp::test_exposed_vec`. + * + * Calls `MR_CSharp_test_exposed_vec()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout test_exposed_vec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_vec.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test that capturing lifetime of an exposed struct is a no-op. + * Generated from function `MR::CSharp::asave_ref_in_exposed_layout`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_asave_ref_in_exposed_layout()`. + */ + public static mrbind_test.mr.csharp.NonTrivial asave_ref_in_exposed_layout(mrbind_test.mr.csharp.ExposedLayout ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_asave_ref_in_exposed_layout.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayoutSh()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::make_exposed_sh`. + * + * Calls `MR_CSharp_make_exposed_sh()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh make_exposed_sh() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_make_exposed_sh.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * And try an equality comparison! + * Generated from function `MR::CSharp::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutB()`. + */ + public static boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutB _1, mrbind_test.mr.csharp.ExposedLayoutB _2) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_C_equal_MR_CSharp_ExposedLayoutB.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_optint`. + * + * Calls `MR_CSharp_test_optint()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint(int a, mrbind_test.mr.cs.std_optional_int b, mrbind_test.mr.cs.std_optional_int c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ref`. + * + * Calls `MR_CSharp_test_optint_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_ref(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cref`. + * + * Calls `MR_CSharp_test_optint_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_cref(int a, mrbind_test.mr.cs.std_optional_int b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ptr`. + * + * Calls `MR_CSharp_test_optint_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_ptr(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cptr`. + * + * Calls `MR_CSharp_test_optint_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_cptr(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr`. + * + * Calls `MR_CSharp_test_optstr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b, mrbind_test.mr.cs.std_optional_std_string c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ref`. + * + * Calls `MR_CSharp_test_optstr_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ref(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cref`. + * + * Calls `MR_CSharp_test_optstr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cref.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ptr`. + * + * Calls `MR_CSharp_test_optstr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cptr`. + * + * Calls `MR_CSharp_test_optstr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv`. + * + * Calls `MR_CSharp_test_opttriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ref`. + * + * Calls `MR_CSharp_test_opttriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cref`. + * + * Calls `MR_CSharp_test_opttriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ptr`. + * + * Calls `MR_CSharp_test_opttriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cptr`. + * + * Calls `MR_CSharp_test_opttriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv`. + * + * Calls `MR_CSharp_test_optnontriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, mrbind_test.mr.csharp.NonTrivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ref`. + * + * Calls `MR_CSharp_test_optnontriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cref`. + * + * Calls `MR_CSharp_test_optnontriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cref.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ptr`. + * + * Calls `MR_CSharp_test_optnontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cptr`. + * + * Calls `MR_CSharp_test_optnontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp`. + * + * Calls `MR_CSharp_test_optshexp()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ref`. + * + * Calls `MR_CSharp_test_optshexp_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cref`. + * + * Calls `MR_CSharp_test_optshexp_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ptr`. + * + * Calls `MR_CSharp_test_optshexp_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cptr`. + * + * Calls `MR_CSharp_test_optshexp_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv`. + * + * Calls `MR_CSharp_test_optshtriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, mrbind_test.mr.cs.std_optional_MR_CSharp_SA c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ref`. + * + * Calls `MR_CSharp_test_optshtriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cref`. + * + * Calls `MR_CSharp_test_optshtriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cref(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ptr`. + * + * Calls `MR_CSharp_test_optshtriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cptr`. + * + * Calls `MR_CSharp_test_optshtriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Tag types: + * Generated from function `MR::CSharp::test_tag`. + * + * Calls `MR_CSharp_test_tag()`. + */ + public static void test_tag() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cref`. + * + * Calls `MR_CSharp_test_tag_cref()`. + */ + public static void test_tag_cref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cref.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_ptr`. + * + * Calls `MR_CSharp_test_tag_ptr()`. + */ + public static boolean test_tag_ptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_ptr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cptr`. + * + * Calls `MR_CSharp_test_tag_cptr()`. + */ + public static boolean test_tag_cptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cptr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_variant`. + * + * Calls `MR_CSharp_test_variant()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ref`. + * + * Calls `MR_CSharp_test_variant_ref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_ref(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cref`. + * + * Calls `MR_CSharp_test_variant_cref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_cref(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ptr`. + * + * Calls `MR_CSharp_test_variant_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_ptr(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cptr`. + * + * Calls `MR_CSharp_test_variant_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_cptr(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Test a variant that has duplicate element types. + * Generated from function `MR::CSharp::test_variant_with_repeated_types`. + * + * Calls `MR_CSharp_test_variant_with_repeated_types()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float test_variant_with_repeated_types() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_with_repeated_types.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Input and output streams: + * Generated from function `MR::CSharp::test_iostreams_ref`. + * + * Calls `MR_CSharp_test_iostreams_ref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_ptr`. + * + * Calls `MR_CSharp_test_iostreams_ptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cref`. + * + * Calls `MR_CSharp_test_iostreams_cref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cptr`. + * + * Calls `MR_CSharp_test_iostreams_cptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr`. + * + * Calls `MR_CSharp_test_uniqueptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_uniqueptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ref`. + * + * Calls `MR_CSharp_test_uniqueptr_ref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ref(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ref.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cref`. + * + * Calls `MR_CSharp_test_uniqueptr_cref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cref(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ptr`. + * + * Calls `MR_CSharp_test_uniqueptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ptr(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ptr.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release(), c); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cptr`. + * + * Calls `MR_CSharp_test_uniqueptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cptr(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ref`. + * + * Calls `MR_CSharp_test_plainarr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cref`. + * + * Calls `MR_CSharp_test_plainarr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_rref`. + * + * Calls `MR_CSharp_test_plainarr_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_crref`. + * + * Calls `MR_CSharp_test_plainarr_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ptr`. + * + * Calls `MR_CSharp_test_plainarr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cptr`. + * + * Calls `MR_CSharp_test_plainarr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ref`. + * + * Calls `MR_CSharp_test_plainarr2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cref`. + * + * Calls `MR_CSharp_test_plainarr2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_rref`. + * + * Calls `MR_CSharp_test_plainarr2_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_crref`. + * + * Calls `MR_CSharp_test_plainarr2_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ptr`. + * + * Calls `MR_CSharp_test_plainarr2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cptr`. + * + * Calls `MR_CSharp_test_plainarr2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ref`. + * + * Calls `MR_CSharp_test_plainarrenum_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cref`. + * + * Calls `MR_CSharp_test_plainarrenum_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ref`. + * + * Calls `MR_CSharp_test_plainarrenum2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cref`. + * + * Calls `MR_CSharp_test_plainarrenum2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Some multi-level pointer madness: + * Generated from function `MR::CSharp::test_ptrs1`. + * + * Calls `MR_CSharp_test_ptrs1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs1(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs1.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ptrs2`. + * + * Calls `MR_CSharp_test_ptrs2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs2(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs2.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ref`. + * + * Calls `MR_CSharp_test_intptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cref`. + * + * Calls `MR_CSharp_test_intptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ptr`. + * + * Calls `MR_CSharp_test_intptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cptr`. + * + * Calls `MR_CSharp_test_intptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ref`. + * + * Calls `MR_CSharp_test_intcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cref`. + * + * Calls `MR_CSharp_test_intcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ptr`. + * + * Calls `MR_CSharp_test_intcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cptr`. + * + * Calls `MR_CSharp_test_intcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ref`. + * + * Calls `MR_CSharp_test_intptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cref`. + * + * Calls `MR_CSharp_test_intptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ptr`. + * + * Calls `MR_CSharp_test_intptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cptr`. + * + * Calls `MR_CSharp_test_intptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ref`. + * + * Calls `MR_CSharp_test_voidptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cref`. + * + * Calls `MR_CSharp_test_voidptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ptr`. + * + * Calls `MR_CSharp_test_voidptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cptr`. + * + * Calls `MR_CSharp_test_voidptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ref`. + * + * Calls `MR_CSharp_test_voidptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cref`. + * + * Calls `MR_CSharp_test_voidptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ptr`. + * + * Calls `MR_CSharp_test_voidptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cptr`. + * + * Calls `MR_CSharp_test_voidptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ref`. + * + * Calls `MR_CSharp_test_arrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cref`. + * + * Calls `MR_CSharp_test_arrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ptr`. + * + * Calls `MR_CSharp_test_arrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cptr`. + * + * Calls `MR_CSharp_test_arrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ref`. + * + * Calls `MR_CSharp_test_arrcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cref`. + * + * Calls `MR_CSharp_test_arrcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ptr`. + * + * Calls `MR_CSharp_test_arrcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cptr`. + * + * Calls `MR_CSharp_test_arrcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflicts`. + * + * Calls `MR_CSharp_nameConflicts()`. + */ + public static void nameConflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflicts.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflictsExposed`. + * + * Calls `MR_CSharp_nameConflictsExposed()`. + */ + public static void nameConflictsExposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflictsExposed.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_int()`. + */ + public static void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_float()`. + */ + public static void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_int()`. + */ + public static int template_b_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_int.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_float()`. + */ + public static float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_int()`. + */ + public static void template_c_int() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_int.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_float()`. + */ + public static void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_float.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::instantiate`. + * + * Calls `MR_CSharp_instantiate()`. + */ + public static void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_instantiate.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int_const_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_C_deref_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = b; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesC()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_MR_CSharp_LifetimesC.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = c; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer begin_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer end_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_int()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableL_int self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_int()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableL_int self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Vectors of pointers to a class. + * Currently `IEnumerable` is disabled for those, it needs to be fixed. + * Generated from function `MR::CSharp::test_vec_of_mut_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_mut_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr test_vec_of_mut_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_mut_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_vec_of_const_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_const_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr test_vec_of_const_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_const_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test decomposition for certain whitelisted standard tuple-like types: (tuples and pairs) + * Generated from function `MR::CSharp::get_tuple0`. + * + * Calls `MR_CSharp_get_tuple0()`. + */ + public static mrbind_test.mr.cs.std_tuple get_tuple0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple0.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple1`. + * + * Calls `MR_CSharp_get_tuple1()`. + */ + public static mrbind_test.mr.cs.std_tuple_int get_tuple1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple1.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple2`. + * + * Calls `MR_CSharp_get_tuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_std_string get_tuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple2.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_pair2`. + * + * Calls `MR_CSharp_get_pair2()`. + */ + public static mrbind_test.mr.cs.std_pair_int_std_string get_pair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_pair2.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_const`. + * + * Calls `MR_CSharp_get_tuple_const()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_std_string get_tuple_const() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_const.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_const_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_refs`. + * + * Calls `MR_CSharp_get_tuple_refs()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref get_tuple_refs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_refs.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_crefs`. + * + * Calls `MR_CSharp_get_tuple_crefs()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref get_tuple_crefs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_crefs.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_value`. + * + * Calls `MR_CSharp_get_tuple_exposed_value()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout get_tuple_exposed_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_value.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_lvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_lvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref get_tuple_exposed_lvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_lvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_rvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_rvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref get_tuple_exposed_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_rvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int`. + * + * Calls `MR_CSharp_test_expected_int()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ref`. + * + * Calls `MR_CSharp_test_expected_int_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ref(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cref`. + * + * Calls `MR_CSharp_test_expected_int_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cref(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ptr`. + * + * Calls `MR_CSharp_test_expected_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ptr(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cptr`. + * + * Calls `MR_CSharp_test_expected_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cptr(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void`. + * + * Calls `MR_CSharp_test_expected_void()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ref`. + * + * Calls `MR_CSharp_test_expected_void_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ref(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cref`. + * + * Calls `MR_CSharp_test_expected_void_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cref(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ptr`. + * + * Calls `MR_CSharp_test_expected_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ptr(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cptr`. + * + * Calls `MR_CSharp_test_expected_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cptr(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum`. + * + * Calls `MR_CSharp_test_expected_enum()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ref`. + * + * Calls `MR_CSharp_test_expected_enum_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cref`. + * + * Calls `MR_CSharp_test_expected_enum_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ptr`. + * + * Calls `MR_CSharp_test_expected_enum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cptr`. + * + * Calls `MR_CSharp_test_expected_enum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv`. + * + * Calls `MR_CSharp_test_expected_triv()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ref`. + * + * Calls `MR_CSharp_test_expected_triv_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cref`. + * + * Calls `MR_CSharp_test_expected_triv_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ptr`. + * + * Calls `MR_CSharp_test_expected_triv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cptr`. + * + * Calls `MR_CSharp_test_expected_triv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv`. + * + * Calls `MR_CSharp_test_expected_nontriv()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ref`. + * + * Calls `MR_CSharp_test_expected_nontriv_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cref`. + * + * Calls `MR_CSharp_test_expected_nontriv_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared`. + * + * Calls `MR_CSharp_test_expected_shared()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ref`. + * + * Calls `MR_CSharp_test_expected_shared_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cref`. + * + * Calls `MR_CSharp_test_expected_shared_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed`. + * + * Calls `MR_CSharp_test_expected_exposed()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared`. + * + * Calls `MR_CSharp_test_expected_exposed_shared()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/G.java b/test/output_java/src/mrbind_test/mr/csharp/G.java new file mode 100644 index 00000000..2d596654 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,346 @@ +package mrbind_test.mr.csharp; + +/** + * Even if the secondary bases are virtual, this doesn't affect anything. + * Generated from class `MR::CSharp::G`. + * Base classes: + * Virtual: + * `MR::CSharp::E` + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.csharp.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_G_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::G::foo`. + * + * Calls `MR_CSharp_G_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::bar`. + * + * Calls `MR_CSharp_G_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::static_foo`. + * + * Calls `MR_CSharp_G_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::G::static_bar`. + * + * Calls `MR_CSharp_G_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::G::virtual_foo`. + * + * Calls `MR_CSharp_G_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::virtual_bar`. + * + * Calls `MR_CSharp_G_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::refs`. + * + * Calls `MR_CSharp_G_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::d1`. + * + * Calls `MR_CSharp_G_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::d2`. + * + * Calls `MR_CSharp_G_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::e1`. + * + * Calls `MR_CSharp_G_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::e2`. + * + * Calls `MR_CSharp_G_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java new file mode 100644 index 00000000..4e487187 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,199 @@ +package mrbind_test.mr.csharp; + +/** + * This is the happy path. + * This emits static operators in the const half, and non-static operators (or functions pre C# 14) in the non-const half. + * Generated from class `MR::CSharp::IncrDecrA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrA_DefaultConstruct()`. + */ + public IncrDecrA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrA::IncrDecrA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrA_ConstructFromAnother()`. + */ + public IncrDecrA(mrbind_test.mr.csharp.IncrDecrA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrA assignFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java new file mode 100644 index 00000000..b87091a4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Same as above, but everything gets emitted in the const half. + * Generated from class `MR::CSharp::IncrDecrB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrB_DefaultConstruct()`. + */ + public IncrDecrB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrB::IncrDecrB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrB_ConstructFromAnother()`. + */ + public IncrDecrB(mrbind_test.mr.csharp.IncrDecrB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrB assignFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrC.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrC.java new file mode 100644 index 00000000..222695d9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrC.java @@ -0,0 +1,200 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are not marked const, so they're also in the non-const half. + * Generated from class `MR::CSharp::IncrDecrC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrC_DefaultConstruct()`. + */ + public IncrDecrC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrC::IncrDecrC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrC_ConstructFromAnother()`. + */ + public IncrDecrC(mrbind_test.mr.csharp.IncrDecrC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrC assignFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrD.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrD.java new file mode 100644 index 00000000..12a31479 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrD.java @@ -0,0 +1,200 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are in the const half due to being marked const. + * Generated from class `MR::CSharp::IncrDecrD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrD_DefaultConstruct()`. + */ + public IncrDecrD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrD::IncrDecrD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrD_ConstructFromAnother()`. + */ + public IncrDecrD(mrbind_test.mr.csharp.IncrDecrD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrD assignFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrE.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrE.java new file mode 100644 index 00000000..fab05d1a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrE.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the non-const half. + * Generated from class `MR::CSharp::IncrDecrE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrE_DefaultConstruct()`. + */ + public IncrDecrE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrE::IncrDecrE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrE_ConstructFromAnother()`. + */ + public IncrDecrE(mrbind_test.mr.csharp.IncrDecrE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrF.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrF.java new file mode 100644 index 00000000..550cf599 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrF.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the const half. + * Generated from class `MR::CSharp::IncrDecrF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrF_DefaultConstruct()`. + */ + public IncrDecrF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrF::IncrDecrF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrF_ConstructFromAnother()`. + */ + public IncrDecrF(mrbind_test.mr.csharp.IncrDecrF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrG.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrG.java new file mode 100644 index 00000000..ad9c1ba9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrG.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrG_DefaultConstruct()`. + */ + public IncrDecrG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrG::IncrDecrG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrG_ConstructFromAnother()`. + */ + public IncrDecrG(mrbind_test.mr.csharp.IncrDecrG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrH.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrH.java new file mode 100644 index 00000000..9bab68a8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrH.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrH_DefaultConstruct()`. + */ + public IncrDecrH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrH::IncrDecrH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrH_ConstructFromAnother()`. + */ + public IncrDecrH(mrbind_test.mr.csharp.IncrDecrH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrI.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrI.java new file mode 100644 index 00000000..c9f2631b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrI.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Friend functions. + * Generated from class `MR::CSharp::IncrDecrI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrI_DefaultConstruct()`. + */ + public IncrDecrI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrI::IncrDecrI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrI_ConstructFromAnother()`. + */ + public IncrDecrI(mrbind_test.mr.csharp.IncrDecrI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrI assignFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java new file mode 100644 index 00000000..83fe7c92 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,196 @@ +package mrbind_test.mr.csharp; + +/** + * Subscription operator. + * Generated from class `MR::CSharp::IndexerA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerA_DefaultConstruct()`. + */ + public IndexerA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerA` elementwise. + * + * Calls `MR_CSharp_IndexerA_ConstructFrom()`. + */ + public IndexerA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerA::IndexerA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerA_ConstructFromAnother()`. + */ + public IndexerA(mrbind_test.mr.csharp.IndexerA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerA assignFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator[]`. + * + * Calls `MR_CSharp_IndexerA_index()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment index(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerA` named `x`. + * + * Calls `MR_CSharp_IndexerA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..82f11fea --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,252 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerB_DefaultConstruct()`. + */ + public IndexerB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFrom()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.IndexerA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerB::IndexerB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFromAnother()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerB assignFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_1()`. + */ + public mrbind_test.mr.csharp.IndexerA index_1(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_1.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_2()`. + */ + public mrbind_test.mr.csharp.IndexerA index_2(int i, int j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_2.invokeExact(rawPointer(), i, j); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_0()`. + */ + public mrbind_test.mr.csharp.IndexerA index_0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerB_Get_a()`. + */ + public mrbind_test.mr.csharp.IndexerA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_IndexerB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.IndexerA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IndexerC.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerC.java new file mode 100644 index 00000000..5ae4eaea --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerC.java @@ -0,0 +1,150 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerC_DefaultConstruct()`. + */ + public IndexerC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerC::IndexerC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerC_ConstructFromAnother()`. + */ + public IndexerC(mrbind_test.mr.csharp.IndexerC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerC assignFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index_mut()`. + */ + public int index_mut(int i) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index()`. + */ + public float index(int i) + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java/src/mrbind_test/mr/csharp/IterableA.java new file mode 100644 index 00000000..2907b39c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableA.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * Const member functions. + * Generated from class `MR::CSharp::IterableA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableA_DefaultConstruct()`. + */ + public IterableA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableA::IterableA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableA_ConstructFromAnother()`. + */ + public IterableA(mrbind_test.mr.csharp.IterableA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableA assignFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableA_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableA_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableA` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableA_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableA` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableA_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java new file mode 100644 index 00000000..e5f807ff --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable member functions. + * Generated from class `MR::CSharp::IterableB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableB_DefaultConstruct()`. + */ + public IterableB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableB::IterableB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableB_ConstructFromAnother()`. + */ + public IterableB(mrbind_test.mr.csharp.IterableB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableB assignFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableB_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableB_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableB` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableB_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableB` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableB_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java new file mode 100644 index 00000000..1ffa51f6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,242 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable member functions. + * Generated from class `MR::CSharp::IterableC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableC_DefaultConstruct()`. + */ + public IterableC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableC::IterableC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableC_ConstructFromAnother()`. + */ + public IterableC(mrbind_test.mr.csharp.IterableC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableC assignFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableC` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableC_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableC` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableC_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java new file mode 100644 index 00000000..d580d07e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Const free functions. + * Generated from class `MR::CSharp::IterableD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableD_DefaultConstruct()`. + */ + public IterableD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableD::IterableD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableD_ConstructFromAnother()`. + */ + public IterableD(mrbind_test.mr.csharp.IterableD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableD assignFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableD` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableD_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableD` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableD_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java new file mode 100644 index 00000000..99a32be9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable free functions. + * Generated from class `MR::CSharp::IterableE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableE_DefaultConstruct()`. + */ + public IterableE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableE::IterableE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableE_ConstructFromAnother()`. + */ + public IterableE(mrbind_test.mr.csharp.IterableE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableE assignFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableE` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableE_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableE` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableE_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java new file mode 100644 index 00000000..e43b1dd0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable free functions. + * Generated from class `MR::CSharp::IterableF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableF_DefaultConstruct()`. + */ + public IterableF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableF::IterableF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableF_ConstructFromAnother()`. + */ + public IterableF(mrbind_test.mr.csharp.IterableF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableF assignFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableF` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableF_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableF` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableF_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java new file mode 100644 index 00000000..2543b59c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java @@ -0,0 +1,197 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable class instances. + * Generated from class `MR::CSharp::IterableG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableG_DefaultConstruct()`. + */ + public IterableG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableG::IterableG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableG_ConstructFromAnother()`. + */ + public IterableG(mrbind_test.mr.csharp.IterableG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableG assignFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableG_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableG_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableG` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableG_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableG` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableG_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java new file mode 100644 index 00000000..066d6a95 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const class instances. + * Generated from class `MR::CSharp::IterableH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableH_DefaultConstruct()`. + */ + public IterableH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableH::IterableH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableH_ConstructFromAnother()`. + */ + public IterableH(mrbind_test.mr.csharp.IterableH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableH::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableH_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableH_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableH` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableH_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableH` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableH_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java new file mode 100644 index 00000000..b36ca26e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java @@ -0,0 +1,197 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable exposed struct instances. + * Generated from class `MR::CSharp::IterableI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableI_DefaultConstruct()`. + */ + public IterableI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableI::IterableI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableI_ConstructFromAnother()`. + */ + public IterableI(mrbind_test.mr.csharp.IterableI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableI_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableI_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableI` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableI_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableI` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableI_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java new file mode 100644 index 00000000..7fb5a94a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java @@ -0,0 +1,198 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const exposed struct instances. + * Generated from class `MR::CSharp::IterableJ`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableJ extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableJ(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableJ::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableJ_DefaultConstruct()`. + */ + public IterableJ() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableJ::IterableJ`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableJ_ConstructFromAnother()`. + */ + public IterableJ(mrbind_test.mr.csharp.IterableJ _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableJ_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableJ assignFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableJ(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableJ::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableJ_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableJ_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableJ` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableJ_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableJ` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableJ_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java new file mode 100644 index 00000000..35703036 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java @@ -0,0 +1,195 @@ +package mrbind_test.mr.csharp; + +/** + * The sentinel having a different type. + * Generated from class `MR::CSharp::IterableK`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_DefaultConstruct()`. + */ + public IterableK() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::IterableK`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_ConstructFromAnother()`. + */ + public IterableK(mrbind_test.mr.csharp.IterableK _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK assignFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableK::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableK_begin()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableK_end()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableK` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableK_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java new file mode 100644 index 00000000..fe9000be --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,243 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Iter`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Iter extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Iter::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Iter_DefaultConstruct()`. + */ + public IterableK_Iter() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Iter` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Iter::Iter`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFromAnother()`. + */ + public IterableK_Iter(mrbind_test.mr.csharp.IterableK_Iter _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Iter_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter assignFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_IterableK_Iter()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IterableK_Iter()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.IterableK_Sentinel s) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(s); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Iter_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Iter_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java new file mode 100644 index 00000000..c1637e31 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,174 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Sentinel`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Sentinel extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Sentinel::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Sentinel_DefaultConstruct()`. + */ + public IterableK_Sentinel() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Sentinel` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Sentinel::Sentinel`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFromAnother()`. + */ + public IterableK_Sentinel(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Sentinel::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Sentinel_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel assignFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Sentinel_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Sentinel_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java new file mode 100644 index 00000000..006a1b92 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * Templated free functions. + * Generated from class `MR::CSharp::IterableL`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableL_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableL_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableL_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableL_int_DefaultConstruct()`. + */ + public IterableL_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableL::IterableL`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableL_int_ConstructFromAnother()`. + */ + public IterableL_int(mrbind_test.mr.csharp.IterableL_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableL_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableL_int_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableL_int assignFromAnother(mrbind_test.mr.csharp.IterableL_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableL_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableL_int_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableL_int_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableL` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableL_int_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableL` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableL_int_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java new file mode 100644 index 00000000..e774723e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.csharp; + +/** + * Keep-alive sorcery: + * Generated from class `MR::CSharp::LifetimesA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesA_DefaultConstruct()`. + */ + public LifetimesA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesA` elementwise. + * + * Calls `MR_CSharp_LifetimesA_ConstructFrom()`. + */ + public LifetimesA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesA::LifetimesA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesA_ConstructFromAnother()`. + */ + public LifetimesA(mrbind_test.mr.csharp.LifetimesA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesA assignFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Some degenerate cases that have to be ignored in C#, because we don't support the lifetime operations for those types. + * Generated from method `MR::CSharp::LifetimesA::foo`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesA_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::bar`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public void bar(java.lang.foreign.MemorySegment ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_bar.invokeExact(rawPointer(), ref); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesA` named `x`. + * + * Calls `MR_CSharp_LifetimesA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..6356fb5d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,256 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesB_DefaultConstruct()`. + */ + public LifetimesB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFrom()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesB::LifetimesB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFromAnother()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesB assignFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from method `MR::CSharp::LifetimesB::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesB_begin()`. + */ + public mrbind_test.mr.csharp.LifetimesA begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesB_end()`. + */ + public mrbind_test.mr.csharp.LifetimesA end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesB_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA opMul() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_LifetimesB_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesB_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java new file mode 100644 index 00000000..f4bb2eb0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,180 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesC_DefaultConstruct()`. + */ + public LifetimesC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesC` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFrom()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesC::LifetimesC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFromAnother()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesC assignFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesC_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesC_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java new file mode 100644 index 00000000..22530107 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,369 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_ConstructFromAnother()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Store param references in this. The two annotation styles are equivalent for constructors. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the parameter `ref` might be preserved in the constructed object. + * The reference to the parameter `other_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_Construct_2()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + this(__ctor_construct_2(ref, other_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_2.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * `--infer-lifetime-constructors` should act on this. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the parameter `ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesA(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesA(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Store reference to this in param. + * `--infer-lifetime-constructors` skips this, because we already have custom attributes. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the constructed object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesB(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesB(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesD assignFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::get`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref_static`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref_static()`. + */ + public static mrbind_test.mr.csharp.LifetimesA return_ref_static(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref_static.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_this`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_param`. + * The reference to the parameter `ref` might be preserved in the parameter `other_ref`. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_param()`. + */ + public void store_ref_in_param(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_this_in_param`. + * The reference to this object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_store_this_in_param()`. + */ + public void store_this_in_param(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_this_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesD_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesD_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java new file mode 100644 index 00000000..f78d058d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,232 @@ +package mrbind_test.mr.csharp; + +/** + * Nested attributes. + * Generated from class `MR::CSharp::LifetimesE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesE_ConstructFromAnother()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the constructed object (if any) might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesE_Construct()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesE assignFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::get`. + * The reference to things referred to by this object (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::return_ref`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::store_ref_in_this`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesE_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesE_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java new file mode 100644 index 00000000..aa97100b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,247 @@ +package mrbind_test.mr.csharp; + +/** + * Members having the same name as the exposed class, after rewriting. + * Generated from class `MR::CSharp::NameConflicts`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_DefaultConstruct()`. + */ + public NameConflicts() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::NameConflicts` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFrom()`. + */ + public NameConflicts(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + this(__ctor_constructFrom(name_conflicts, a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFrom.invokeExact(name_conflicts, mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::NameConflicts`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFromAnother()`. + */ + public NameConflicts(mrbind_test.mr.csharp.NameConflicts _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts assignFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::name_Conflicts`. + * + * Calls `MR_CSharp_NameConflicts_name_Conflicts()`. + */ + public void name_Conflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_name_Conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_name_conflicts()`. + */ + public int name_conflicts() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * + * Calls `MR_CSharp_NameConflicts_Set_name_conflicts()`. + */ + public void setName_conflicts(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_a()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_NameConflicts_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.NameConflicts_A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed.java b/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed.java new file mode 100644 index 00000000..ed36e0b6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed.java @@ -0,0 +1,56 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"name_conflicts_exposed", "a"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT}); + public static final long OFF_name_conflicts_exposed = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("name_conflicts_exposed")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 8, 4, "MR::CSharp::NameConflictsExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed copy() {return new NameConflictsExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int name_conflicts_exposed() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed);} + public void setName_conflicts_exposed(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed, value);} + + public mrbind_test.mr.csharp.NameConflictsExposed_A a() {return new mrbind_test.mr.csharp.NameConflictsExposed_A(segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.csharp.NameConflictsExposed_A value) {segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + /** + * Generated from method `MR::CSharp::NameConflictsExposed::name_Conflicts_exposed`. + * + * Calls `MR_CSharp_NameConflictsExposed_name_Conflicts_exposed()`. + */ + public void name_Conflicts_exposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflictsExposed_name_Conflicts_exposed.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public NameConflictsExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java b/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java new file mode 100644 index 00000000..82e55f43 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed_A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::NameConflictsExposed::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed_A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed_A copy() {return new NameConflictsExposed_A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed_A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public NameConflictsExposed_A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NameConflicts_A.java b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts_A.java new file mode 100644 index 00000000..5509b45d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts_A.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflicts::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_A_DefaultConstruct()`. + */ + public NameConflicts_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_A_ConstructFromAnother()`. + */ + public NameConflicts_A(mrbind_test.mr.csharp.NameConflicts_A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A assignFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java b/test/output_java/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java new file mode 100644 index 00000000..0a0ec816 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, so operators with by-value parameters fail to inject. + * Generated from class `MR::CSharp::NonCopyableClassByValueOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonCopyableClassByValueOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonCopyableClassByValueOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonCopyableClassByValueOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct()`. + */ + public NonCopyableClassByValueOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonCopyableClassByValueOps::NonCopyableClassByValueOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother()`. + */ + public NonCopyableClassByValueOps(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonCopyableClassByValueOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonCopyableClassByValueOps assignFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonCopyableClassByValueOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java new file mode 100644 index 00000000..86f8c7df --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivial::NonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public NonTrivial(mrbind_test.mr.csharp.NonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NonTrivialClassOps.java b/test/output_java/src/mrbind_test/mr/csharp/NonTrivialClassOps.java new file mode 100644 index 00000000..bce36943 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NonTrivialClassOps.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.csharp; + +/** + * Check how non-trivial class types are passed by value into operators. + * Generated from class `MR::CSharp::NonTrivialClassOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialClassOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialClassOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialClassOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialClassOps_DefaultConstruct()`. + */ + public NonTrivialClassOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialClassOps::NonTrivialClassOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialClassOps_ConstructFromAnother()`. + */ + public NonTrivialClassOps(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialClassOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialClassOps assignFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialClassOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_int()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_add_MR_CSharp_NonTrivialClassOps_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/NonTrivialDerived.java b/test/output_java/src/mrbind_test/mr/csharp/NonTrivialDerived.java new file mode 100644 index 00000000..e39518cb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/NonTrivialDerived.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialDerived_DefaultConstruct()`. + */ + public NonTrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialDerived::NonTrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialDerived_ConstructFromAnother()`. + */ + public NonTrivialDerived(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialDerived assignFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/Outer.java b/test/output_java/src/mrbind_test/mr/csharp/Outer.java new file mode 100644 index 00000000..7a71aae8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Outer.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.csharp; + +/** + * Nested classes. + * Generated from class `MR::CSharp::Outer`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_DefaultConstruct()`. + */ + public Outer() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Outer`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_ConstructFromAnother()`. + */ + public Outer(mrbind_test.mr.csharp.Outer _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer assignFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::foo`. + * + * Calls `MR_CSharp_Outer_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/Outer_Inner.java b/test/output_java/src/mrbind_test/mr/csharp/Outer_Inner.java new file mode 100644 index 00000000..dbe7d65e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Outer_Inner.java @@ -0,0 +1,126 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Outer::Inner`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer_Inner extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer_Inner(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer_Inner::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_Inner_DefaultConstruct()`. + */ + public Outer_Inner() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Inner::Inner`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_Inner_ConstructFromAnother()`. + */ + public Outer_Inner(mrbind_test.mr.csharp.Outer_Inner _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_Inner_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer_Inner assignFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer_Inner(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::bar`. + * + * Calls `MR_CSharp_Outer_Inner_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalA.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalA.java new file mode 100644 index 00000000..f2e53f39 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalA.java @@ -0,0 +1,201 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is const. + * Generated from class `MR::CSharp::RelationalA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalA_DefaultConstruct()`. + */ + public RelationalA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalA::RelationalA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalA_ConstructFromAnother()`. + */ + public RelationalA(mrbind_test.mr.csharp.RelationalA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalA assignFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalA()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalA()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalA()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalA()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalB.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalB.java new file mode 100644 index 00000000..766167ac --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalB.java @@ -0,0 +1,201 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is non-const. + * Generated from class `MR::CSharp::RelationalB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalB_DefaultConstruct()`. + */ + public RelationalB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalB::RelationalB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalB_ConstructFromAnother()`. + */ + public RelationalB(mrbind_test.mr.csharp.RelationalB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalB assignFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalB()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalB()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalB()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalB()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalC.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalC.java new file mode 100644 index 00000000..885fd8ae --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalC.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have mixed constness, which causes them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalC_DefaultConstruct()`. + */ + public RelationalC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalC::RelationalC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalC_ConstructFromAnother()`. + */ + public RelationalC(mrbind_test.mr.csharp.RelationalC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalC assignFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * bool operator<=(RelationalC &) const {return false;} // Skip one operator to observe the function missing. + * Generated from method `MR::CSharp::RelationalC::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalD.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalD.java new file mode 100644 index 00000000..43a4ebbe --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalD.java @@ -0,0 +1,201 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have operands of different types, causing them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalD_DefaultConstruct()`. + */ + public RelationalD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalD::RelationalD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalD_ConstructFromAnother()`. + */ + public RelationalD(mrbind_test.mr.csharp.RelationalD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalD assignFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java new file mode 100644 index 00000000..76d9d05c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java @@ -0,0 +1,201 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have a weird return type. + * Generated from class `MR::CSharp::RelationalE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalE_DefaultConstruct()`. + */ + public RelationalE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalE::RelationalE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalE_ConstructFromAnother()`. + */ + public RelationalE(mrbind_test.mr.csharp.RelationalE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalE assignFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java new file mode 100644 index 00000000..6f03c8fa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java @@ -0,0 +1,197 @@ +package mrbind_test.mr.csharp; + +/** + * The operators return void. + * Generated from class `MR::CSharp::RelationalF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalF_DefaultConstruct()`. + */ + public RelationalF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalF::RelationalF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalF_ConstructFromAnother()`. + */ + public RelationalF(mrbind_test.mr.csharp.RelationalF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SA.java b/test/output_java/src/mrbind_test/mr/csharp/SA.java new file mode 100644 index 00000000..8372d9cf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SA`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SA_DefaultConstruct()`. + */ + public SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SA::SA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SA_ConstructFromAnother()`. + */ + public SA(mrbind_test.mr.csharp.SA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SB.java b/test/output_java/src/mrbind_test/mr/csharp/SB.java new file mode 100644 index 00000000..ff016380 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,182 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SB_DefaultConstruct()`. + */ + public SB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SB` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFrom()`. + */ + public SB(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SB::SB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFromAnother()`. + */ + public SB(mrbind_test.mr.csharp.SB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SB assignFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SB` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SB_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SB` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SB_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SC.java b/test/output_java/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..2482e43b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,157 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SC`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SA` + * `MR::CSharp::SB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SC_DefaultConstruct()`. + */ + public SC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SC::SC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SC_ConstructFromAnother()`. + */ + public SC(mrbind_test.mr.csharp.SC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SC` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SC_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SC` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SC_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SD.java b/test/output_java/src/mrbind_test/mr/csharp/SD.java new file mode 100644 index 00000000..86d197a8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SD.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SD`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SD_DefaultConstruct()`. + */ + public SD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SD::SD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SD_ConstructFromAnother()`. + */ + public SD(mrbind_test.mr.csharp.SD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_SD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SD assignFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SE.java b/test/output_java/src/mrbind_test/mr/csharp/SE.java new file mode 100644 index 00000000..3f5958d1 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,182 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SE`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SE_DefaultConstruct()`. + */ + public SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SE` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFrom()`. + */ + public SE(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SE::SE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFromAnother()`. + */ + public SE(mrbind_test.mr.csharp.SE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SE assignFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SE` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SE_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SE` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SE_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SF.java b/test/output_java/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..06efde16 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,157 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SF`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SD` + * `MR::CSharp::SE` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SF_DefaultConstruct()`. + */ + public SF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SF::SF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SF_ConstructFromAnother()`. + */ + public SF(mrbind_test.mr.csharp.SF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SF` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SF_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SF` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SF_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/SG.java b/test/output_java/src/mrbind_test/mr/csharp/SG.java new file mode 100644 index 00000000..32b23914 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/SG.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.csharp; + +/** + * Make sure non-passable classes work fine as `std::shared_ptr` template arguments. + * Generated from class `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsEnum.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsEnum.java new file mode 100644 index 00000000..21fe05b7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsEnum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.csharp; + +/** + * Other injection cases: + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class StaticOpsEnum +{ + public final int value; + + public StaticOpsEnum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static StaticOpsEnum of(int value) + { + return new StaticOpsEnum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof StaticOpsEnum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "StaticOpsEnum(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsA.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsA.java new file mode 100644 index 00000000..f5d03e8b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsA.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsLhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsA_DefaultConstruct()`. + */ + public StaticOpsLhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsA::StaticOpsLhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsA_ConstructFromAnother()`. + */ + public StaticOpsLhsA(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsB.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsB.java new file mode 100644 index 00000000..253abbaf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsB.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsLhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsB_DefaultConstruct()`. + */ + public StaticOpsLhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsB::StaticOpsLhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsB_ConstructFromAnother()`. + */ + public StaticOpsLhsB(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsC.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsC.java new file mode 100644 index 00000000..7f451251 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsC.java @@ -0,0 +1,79 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsLhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsC_DefaultConstruct()`. + */ + public StaticOpsLhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsC::StaticOpsLhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsC_ConstructFromAnother()`. + */ + public StaticOpsLhsC(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsD.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsD.java new file mode 100644 index 00000000..9c934217 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsD.java @@ -0,0 +1,79 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsD_DefaultConstruct()`. + */ + public StaticOpsLhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsD::StaticOpsLhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsD_ConstructFromAnother()`. + */ + public StaticOpsLhsD(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsE.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsE.java new file mode 100644 index 00000000..f3ddc8ec --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsE.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsE_DefaultConstruct()`. + */ + public StaticOpsLhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsE::StaticOpsLhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsE_ConstructFromAnother()`. + */ + public StaticOpsLhsE(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsF.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsF.java new file mode 100644 index 00000000..45f47587 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsF.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsF_DefaultConstruct()`. + */ + public StaticOpsLhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsF::StaticOpsLhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsF_ConstructFromAnother()`. + */ + public StaticOpsLhsF(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsG.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsG.java new file mode 100644 index 00000000..74aa8cfd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsG.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsLhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsG_DefaultConstruct()`. + */ + public StaticOpsLhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsG::StaticOpsLhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsG_ConstructFromAnother()`. + */ + public StaticOpsLhsG(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsH.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsH.java new file mode 100644 index 00000000..bae8e89f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsLhsH.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsLhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsH_DefaultConstruct()`. + */ + public StaticOpsLhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsH::StaticOpsLhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsH_ConstructFromAnother()`. + */ + public StaticOpsLhsH(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java new file mode 100644 index 00000000..946f2c50 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedLhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedLhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedLhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedLhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_DefaultConstruct()`. + */ + public StaticOpsMixedLhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedLhs::StaticOpsMixedLhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother()`. + */ + public StaticOpsMixedLhs(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedLhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedLhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedLhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java new file mode 100644 index 00000000..caa136c8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedRhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedRhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedRhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedRhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_DefaultConstruct()`. + */ + public StaticOpsMixedRhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedRhs::StaticOpsMixedRhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother()`. + */ + public StaticOpsMixedRhs(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedRhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedRhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedRhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsA.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsA.java new file mode 100644 index 00000000..59723c0f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsA.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsRhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsA_DefaultConstruct()`. + */ + public StaticOpsRhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsA::StaticOpsRhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsA_ConstructFromAnother()`. + */ + public StaticOpsRhsA(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsB.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsB.java new file mode 100644 index 00000000..ea551ffc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsB.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsRhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsB_DefaultConstruct()`. + */ + public StaticOpsRhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsB::StaticOpsRhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsB_ConstructFromAnother()`. + */ + public StaticOpsRhsB(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsC.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsC.java new file mode 100644 index 00000000..3a75ea52 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsC.java @@ -0,0 +1,79 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsRhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsC_DefaultConstruct()`. + */ + public StaticOpsRhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsC::StaticOpsRhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsC_ConstructFromAnother()`. + */ + public StaticOpsRhsC(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsD.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsD.java new file mode 100644 index 00000000..bbd7bae6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsD.java @@ -0,0 +1,79 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsD_DefaultConstruct()`. + */ + public StaticOpsRhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsD::StaticOpsRhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsD_ConstructFromAnother()`. + */ + public StaticOpsRhsD(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsE.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsE.java new file mode 100644 index 00000000..6d4cb4de --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsE.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsE_DefaultConstruct()`. + */ + public StaticOpsRhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsE::StaticOpsRhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsE_ConstructFromAnother()`. + */ + public StaticOpsRhsE(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsF.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsF.java new file mode 100644 index 00000000..19f33761 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsF.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsF_DefaultConstruct()`. + */ + public StaticOpsRhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsF::StaticOpsRhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsF_ConstructFromAnother()`. + */ + public StaticOpsRhsF(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsG.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsG.java new file mode 100644 index 00000000..aa25f431 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsG.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsRhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsG_DefaultConstruct()`. + */ + public StaticOpsRhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsG::StaticOpsRhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsG_ConstructFromAnother()`. + */ + public StaticOpsRhsG(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsH.java b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsH.java new file mode 100644 index 00000000..403c3c8a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StaticOpsRhsH.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsRhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsH_DefaultConstruct()`. + */ + public StaticOpsRhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsH::StaticOpsRhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsH_ConstructFromAnother()`. + */ + public StaticOpsRhsH(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StringConvFsPath.java b/test/output_java/src/mrbind_test/mr/csharp/StringConvFsPath.java new file mode 100644 index 00000000..376149c4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StringConvFsPath.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvFsPath`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvFsPath extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvFsPath(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvFsPath::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvFsPath_DefaultConstruct()`. + */ + public StringConvFsPath() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvFsPath::StringConvFsPath`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvFsPath_ConstructFromAnother()`. + */ + public StringConvFsPath(mrbind_test.mr.csharp.StringConvFsPath _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvFsPath::operator std::filesystem::path`. + * + * Calls `MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path()`. + */ + public mrbind_test.mr.cs.std_filesystem_path convertTo_std_filesystem_path() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvFsPath::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvFsPath_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvFsPath assignFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvFsPath(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StringConvString.java b/test/output_java/src/mrbind_test/mr/csharp/StringConvString.java new file mode 100644 index 00000000..f2cc1155 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StringConvString.java @@ -0,0 +1,129 @@ +package mrbind_test.mr.csharp; + +/** + * Conversions to string-like types. + * Those create the additional `operator string` to convert directly to a C# string, and `override string ToString()` to override the method of the implicit base `object`. + * Generated from class `MR::CSharp::StringConvString`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvString extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvString(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvString::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvString_DefaultConstruct()`. + */ + public StringConvString() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvString::StringConvString`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvString_ConstructFromAnother()`. + */ + public StringConvString(mrbind_test.mr.csharp.StringConvString _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvString::operator std::string`. + * + * Calls `MR_CSharp_StringConvString_ConvertTo_std_string()`. + */ + public mrbind_test.mr.cs.std_string convertTo_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConvertTo_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvString::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvString_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvString assignFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvString(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/StringConvStringView.java b/test/output_java/src/mrbind_test/mr/csharp/StringConvStringView.java new file mode 100644 index 00000000..c8b66d87 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/StringConvStringView.java @@ -0,0 +1,128 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvStringView`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvStringView extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvStringView(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvStringView::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvStringView_DefaultConstruct()`. + */ + public StringConvStringView() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvStringView::StringConvStringView`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvStringView_ConstructFromAnother()`. + */ + public StringConvStringView(mrbind_test.mr.csharp.StringConvStringView _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Mark this `explicit` and `const` for a change. + * Generated from conversion operator `MR::CSharp::StringConvStringView::operator std::string_view`. + * + * Calls `MR_CSharp_StringConvStringView_ConvertTo_std_string_view()`. + */ + public mrbind_test.mr.cs.std_string_view convertTo_std_string_view() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConvertTo_std_string_view.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvStringView::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvStringView_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvStringView assignFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvStringView(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestConstness.java b/test/output_java/src/mrbind_test/mr/csharp/TestConstness.java new file mode 100644 index 00000000..3524556c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestConstness.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestConstness`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestConstness extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestConstness(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestConstness::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestConstness_DefaultConstruct()`. + */ + public TestConstness() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestConstness::TestConstness`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestConstness_ConstructFromAnother()`. + */ + public TestConstness(mrbind_test.mr.csharp.TestConstness _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestConstness_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestConstness assignFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestConstness(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo_mut()`. + */ + public void foo_mut() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java/src/mrbind_test/mr/csharp/TestFields.java new file mode 100644 index 00000000..66f18397 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,509 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestFields`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestFields extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestFields(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestFields::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestFields::TestFields`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFromAnother()`. + */ + public TestFields(mrbind_test.mr.csharp.TestFields _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestFields _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::TestFields` elementwise. + * The reference to the parameter `i_ref` might be preserved in the constructed object. + * The reference to the parameter `const_i_ref` might be preserved in the constructed object. + * The reference to the parameter `s` might be preserved in the constructed object. + * The reference to the parameter `const_s` might be preserved in the constructed object. + * The reference to the parameter `s_ref` might be preserved in the constructed object. + * The reference to the parameter `const_s_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public TestFields(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + this(__ctor_constructFrom(i, const_i, i_ref, const_i_ref, s, const_s, s_ref, const_s_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __str_const_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s, "const_s")); + java.lang.foreign.MemorySegment __str_const_s_ref = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s_ref, "const_s_ref")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFrom.invokeExact(i, const_i, i_ref, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, const_i_ref), __str_s, mrbind_test.Ffi.end(__str_s), __str_const_s, mrbind_test.Ffi.end(__str_const_s), mrbind_test.Ffi.ptrNonNull(s_ref, "s_ref"), __str_const_s_ref, mrbind_test.Ffi.end(__str_const_s_ref)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(s_ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_i()`. + */ + public static int static_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_i`. + * + * Calls `MR_CSharp_TestFields_Set_static_i()`. + */ + public static void setStatic_i(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i()`. + */ + public static int static_const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment static_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i_ref()`. + */ + public static int static_const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_s()`. + */ + public static mrbind_test.mr.cs.std_string static_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_s`. + * The reference to the parameter `value` might be preserved in this object in element `static_s`. + * + * Calls `MR_CSharp_TestFields_Set_static_s()`. + */ + public static void setStatic_s(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * < Test same-line documentation comment. + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * < Test same-line documentation comment. + * Modifies a member variable of class `MR::CSharp::TestFields` named `i`. + * + * Calls `MR_CSharp_TestFields_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i()`. + */ + public int const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i_ref()`. + */ + public int const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_TestFields_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s()`. + */ + public mrbind_test.mr.cs.std_string const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s_ref()`. + */ + public mrbind_test.mr.cs.std_string s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s_ref()`. + */ + public mrbind_test.mr.cs.std_string const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java new file mode 100644 index 00000000..9ed605f0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java @@ -0,0 +1,888 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsA::TestOpsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsA_ConstructFromAnother()`. + */ + public TestOpsA(mrbind_test.mr.csharp.TestOpsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsA_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsA()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsA()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsA()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsA()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsA()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsA()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsA()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsA()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsA()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsA()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsA()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsA()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsA()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsA()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+=`. + * + * Calls `MR_CSharp_TestOpsA_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-=`. + * + * Calls `MR_CSharp_TestOpsA_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*=`. + * + * Calls `MR_CSharp_TestOpsA_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/=`. + * + * Calls `MR_CSharp_TestOpsA_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%=`. + * + * Calls `MR_CSharp_TestOpsA_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^=`. + * + * Calls `MR_CSharp_TestOpsA_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&=`. + * + * Calls `MR_CSharp_TestOpsA_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|=`. + * + * Calls `MR_CSharp_TestOpsA_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsA()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsA()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<=`. + * + * Calls `MR_CSharp_TestOpsA_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>=`. + * + * Calls `MR_CSharp_TestOpsA_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsA()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsA()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsA()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsA()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->*`. + * + * Calls `MR_CSharp_TestOpsA_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->`. + * + * Calls `MR_CSharp_TestOpsA_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator()`. + * + * Calls `MR_CSharp_TestOpsA_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator[]`. + * + * Calls `MR_CSharp_TestOpsA_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java new file mode 100644 index 00000000..ce9824ed --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java @@ -0,0 +1,888 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsB::TestOpsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsB_ConstructFromAnother()`. + */ + public TestOpsB(mrbind_test.mr.csharp.TestOpsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsB_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsB()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsB()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsB()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsB()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsB()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsB()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsB()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsB()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsB()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsB()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsB()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsB()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsB()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsB()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+=`. + * + * Calls `MR_CSharp_TestOpsB_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-=`. + * + * Calls `MR_CSharp_TestOpsB_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*=`. + * + * Calls `MR_CSharp_TestOpsB_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/=`. + * + * Calls `MR_CSharp_TestOpsB_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%=`. + * + * Calls `MR_CSharp_TestOpsB_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^=`. + * + * Calls `MR_CSharp_TestOpsB_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&=`. + * + * Calls `MR_CSharp_TestOpsB_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|=`. + * + * Calls `MR_CSharp_TestOpsB_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsB()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsB()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<=`. + * + * Calls `MR_CSharp_TestOpsB_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>=`. + * + * Calls `MR_CSharp_TestOpsB_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsB()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsB()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsB()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsB()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->*`. + * + * Calls `MR_CSharp_TestOpsB_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->`. + * + * Calls `MR_CSharp_TestOpsB_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator()`. + * + * Calls `MR_CSharp_TestOpsB_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator[]`. + * + * Calls `MR_CSharp_TestOpsB_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestOpsC.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsC.java new file mode 100644 index 00000000..05c366e7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestOpsC.java @@ -0,0 +1,878 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsC::TestOpsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsC_ConstructFromAnother()`. + */ + public TestOpsC(mrbind_test.mr.csharp.TestOpsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestOpsC assignFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestOpsC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsC()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsC()`. + */ + public void opSub() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsC()`. + */ + public void opMul() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsC()`. + */ + public void opBitand() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsC()`. + */ + public void opCompl() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsC()`. + */ + public void opNot() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * + * Calls `MR_CSharp_TestOpsC_assign()`. + */ + public void assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+=`. + * + * Calls `MR_CSharp_TestOpsC_add_assign()`. + */ + public void add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-=`. + * + * Calls `MR_CSharp_TestOpsC_sub_assign()`. + */ + public void sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*=`. + * + * Calls `MR_CSharp_TestOpsC_mul_assign()`. + */ + public void mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/=`. + * + * Calls `MR_CSharp_TestOpsC_div_assign()`. + */ + public void div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%=`. + * + * Calls `MR_CSharp_TestOpsC_mod_assign()`. + */ + public void mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^=`. + * + * Calls `MR_CSharp_TestOpsC_xor_assign()`. + */ + public void xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&=`. + * + * Calls `MR_CSharp_TestOpsC_bitand_assign()`. + */ + public void bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|=`. + * + * Calls `MR_CSharp_TestOpsC_bitor_assign()`. + */ + public void bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<=`. + * + * Calls `MR_CSharp_TestOpsC_lshift_assign()`. + */ + public void lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>=`. + * + * Calls `MR_CSharp_TestOpsC_rshift_assign()`. + */ + public void rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->*`. + * + * Calls `MR_CSharp_TestOpsC_arrow_star()`. + */ + public void arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->`. + * + * Calls `MR_CSharp_TestOpsC_arrow()`. + */ + public void arrow() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator()`. + * + * Calls `MR_CSharp_TestOpsC_call()`. + */ + public void call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator[]`. + * + * Calls `MR_CSharp_TestOpsC_index()`. + */ + public void index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java new file mode 100644 index 00000000..6849c3e2 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,497 @@ +package mrbind_test.mr.csharp; + +/** + * Test `std::function`. + * Generated from class `MR::CSharp::TestStdFunction`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestStdFunction extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestStdFunction(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestStdFunction::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestStdFunction_DefaultConstruct()`. + */ + public TestStdFunction() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::TestStdFunction` elementwise. + * The reference to the parameter `f1` might be preserved in the constructed object. + * The reference to the parameter `f2` might be preserved in the constructed object. + * The reference to the parameter `f3` might be preserved in the constructed object. + * The reference to the parameter `f4` might be preserved in the constructed object. + * The reference to the parameter `f5` might be preserved in the constructed object. + * The reference to the parameter `f6` might be preserved in the constructed object. + * The reference to the parameter `f7` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFrom()`. + */ + public TestStdFunction(mrbind_test.mr.cs.std_function_int_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int_int f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5, mrbind_test.mr.cs.std_function_int_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + this(__ctor_constructFrom(f1, f2, f3, f4, f5, f6, f7), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.cs.std_function_int_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int_int f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5, mrbind_test.mr.cs.std_function_int_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFrom.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f1, "f1"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f2, "f2"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f3, "f3"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f4, "f4"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f5, "f5"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f6, "f6"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f7, "f7")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(f1); + java.lang.ref.Reference.reachabilityFence(f2); + java.lang.ref.Reference.reachabilityFence(f3); + java.lang.ref.Reference.reachabilityFence(f4); + java.lang.ref.Reference.reachabilityFence(f5); + java.lang.ref.Reference.reachabilityFence(f6); + java.lang.ref.Reference.reachabilityFence(f7); + } + } + + /** + * Generated from constructor `MR::CSharp::TestStdFunction::TestStdFunction`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFromAnother()`. + */ + public TestStdFunction(mrbind_test.mr.csharp.TestStdFunction _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestStdFunction_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestStdFunction assignFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestStdFunction(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::Call`. + * + * Calls `MR_CSharp_TestStdFunction_Call()`. + */ + public void Call() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f1()`. + */ + public mrbind_test.mr.cs.std_function_int_from_std_string f1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to the parameter `value` might be preserved in this object in element `f1`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f1()`. + */ + public void setF1(mrbind_test.mr.cs.std_function_int_from_std_string value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f2()`. + */ + public mrbind_test.mr.cs.std_function_std_string_from_int_int f2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to the parameter `value` might be preserved in this object in element `f2`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f2()`. + */ + public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int_int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f3()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to the parameter `value` might be preserved in this object in element `f3`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f3()`. + */ + public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f4()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to the parameter `value` might be preserved in this object in element `f4`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f4()`. + */ + public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f5()`. + */ + public mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to the parameter `value` might be preserved in this object in element `f5`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f5()`. + */ + public void setF5(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f6()`. + */ + public mrbind_test.mr.cs.std_function_int_rvalue_ref f6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to the parameter `value` might be preserved in this object in element `f6`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f6()`. + */ + public void setF6(mrbind_test.mr.cs.std_function_int_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f7()`. + */ + public mrbind_test.mr.cs.std_function_void f7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to the parameter `value` might be preserved in this object in element `f7`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f7()`. + */ + public void setF7(mrbind_test.mr.cs.std_function_void value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java/src/mrbind_test/mr/csharp/Trivial.java new file mode 100644 index 00000000..53c0e60f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Trivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Trivial_DefaultConstruct()`. + */ + public Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Trivial::Trivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public Trivial(mrbind_test.mr.csharp.Trivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Trivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Trivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/csharp/TrivialDerived.java b/test/output_java/src/mrbind_test/mr/csharp/TrivialDerived.java new file mode 100644 index 00000000..1c79ab13 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/csharp/TrivialDerived.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TrivialDerived_DefaultConstruct()`. + */ + public TrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TrivialDerived::TrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TrivialDerived_ConstructFromAnother()`. + */ + public TrivialDerived(mrbind_test.mr.csharp.TrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TrivialDerived assignFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/customprefnames/Af.java b/test/output_java/src/mrbind_test/mr/customprefnames/Af.java new file mode 100644 index 00000000..e4e6f70c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/customprefnames/Af.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Af`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Af extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Af(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Af::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Af_DefaultConstruct()`. + */ + public Af() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Af::Af`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Af_ConstructFromAnother()`. + */ + public Af(mrbind_test.mr.customprefnames.Af _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Af::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Af_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Af assignFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Af(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/customprefnames/Ai.java b/test/output_java/src/mrbind_test/mr/customprefnames/Ai.java new file mode 100644 index 00000000..91936354 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/customprefnames/Ai.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Ai`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Ai extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Ai(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Ai::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Ai_DefaultConstruct()`. + */ + public Ai() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Ai::Ai`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Ai_ConstructFromAnother()`. + */ + public Ai(mrbind_test.mr.customprefnames.Ai _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Ai::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Ai_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Ai assignFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Ai(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java new file mode 100644 index 00000000..c8e1d248 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.customprefnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CustomPrefNames::blah`. + * + * Calls `MR_CustomPrefNames_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_blah.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/declorder/A.java b/test/output_java/src/mrbind_test/mr/declorder/A.java new file mode 100644 index 00000000..d00a457b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/declorder/A.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.declorder; + +/** + * Here all classes are whitelisted using `--expose-as-struct`. + * Generated from class `MR::DeclOrder::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"blah"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_blah = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("blah")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int blah() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah);} + public void setBlah(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah, value);} + + /** + * Generated from method `MR::DeclOrder::A::c`. + * + * Calls `MR_DeclOrder_A_c()`. + */ + public mrbind_test.mr.declorder.A_B c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_c.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.declorder.A_B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::d`. + * + * Calls `MR_DeclOrder_A_d()`. + */ + public mrbind_test.mr.declorder.A_E d() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/declorder/A_B.java b/test/output_java/src/mrbind_test/mr/declorder/A_B.java new file mode 100644 index 00000000..b2de2931 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/declorder/A_B.java @@ -0,0 +1,76 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::A::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A::B");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A_B copy() {return new A_B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A_B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::A::B::a`. + * + * Calls `MR_DeclOrder_A_B_a()`. + */ + public mrbind_test.mr.declorder.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_a.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.declorder.A(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::B::b`. + * + * Calls `MR_DeclOrder_A_B_b()`. + */ + public mrbind_test.mr.declorder.A_E b() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A_B() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/declorder/A_E.java b/test/output_java/src/mrbind_test/mr/declorder/A_E.java new file mode 100644 index 00000000..c54b9f17 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/declorder/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.declorder; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/declorder/C_false.java b/test/output_java/src/mrbind_test/mr/declorder/C_false.java new file mode 100644 index 00000000..be0112cc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/declorder/C_false.java @@ -0,0 +1,53 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_false extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_false(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_false copy() {return new C_false(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_false other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_false_blah()`. + */ + public mrbind_test.mr.declorder.C_true blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_false_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.declorder.C_true(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_false() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/declorder/C_true.java b/test/output_java/src/mrbind_test/mr/declorder/C_true.java new file mode 100644 index 00000000..fdc25e1a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/declorder/C_true.java @@ -0,0 +1,53 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_true extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_true(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_true copy() {return new C_true(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_true other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_true_blah()`. + */ + public mrbind_test.mr.declorder.C_false blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_true_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.declorder.C_false(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_true() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java/src/mrbind_test/mr/deprecation/Functions.java new file mode 100644 index 00000000..4f6276e5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/deprecation/Functions.java @@ -0,0 +1,46 @@ +package mrbind_test.mr.deprecation; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Deprecation::foo`. + * + * Calls `MR_Deprecation_foo()`. + */ + @java.lang.Deprecated + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Deprecation::bar`. + * + * Calls `MR_Deprecation_bar()`. + */ + @java.lang.Deprecated + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_bar.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java b/test/output_java/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java new file mode 100644 index 00000000..98f62931 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * Generated from class `MR::IncludesForEnumConstants::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_MR_IncludesForEnumConstants_E_e1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_MR_IncludesForEnumConstants_E_e1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_MR_IncludesForEnumConstants_E_e1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct()`. + */ + public A_MR_IncludesForEnumConstants_E_e1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IncludesForEnumConstants::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother()`. + */ + public A_MR_IncludesForEnumConstants_E_e1(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IncludesForEnumConstants::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother()`. + */ + public mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 assignFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/includesforenumconstants/E.java b/test/output_java/src/mrbind_test/mr/includesforenumconstants/E.java new file mode 100644 index 00000000..e3953a57 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/includesforenumconstants/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java new file mode 100644 index 00000000..2bbc80ac --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Make sure that the `.cpp` implementation file includes the header for `E` correctly. + * Generated from function `MR::IncludesForEnumConstants::foo`. + * + * Calls `MR_IncludesForEnumConstants_foo()`. + */ + public static mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants.H0.MR_IncludesForEnumConstants_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/E.java b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/E.java new file mode 100644 index 00000000..aaf1a2cd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/E.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** + * Can't use an opaque struct as an array element, because, well, it's opaque. But a enum should work. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java new file mode 100644 index 00000000..574aad7d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IncompleteArrayElemType::bar`. + * + * Calls `MR_IncompleteArrayElemType_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public static void bar(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types_2.H0.MR_IncompleteArrayElemType_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::IncompleteArrayElemType::foo`. + * + * Calls `MR_IncompleteArrayElemType_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public static void foo(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types.H0.MR_IncompleteArrayElemType_foo.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/iostream/A.java b/test/output_java/src/mrbind_test/mr/iostream/A.java new file mode 100644 index 00000000..b9a9e4d7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/iostream/A.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.iostream; + +/** + * Generated from class `MR::IOStream::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IOStream_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IOStream::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IOStream_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.iostream.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IOStream::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IOStream_A_AssignFromAnother()`. + */ + public mrbind_test.mr.iostream.A assignFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.iostream.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/iostream/Functions.java b/test/output_java/src/mrbind_test/mr/iostream/Functions.java new file mode 100644 index 00000000..c630cc46 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/iostream/Functions.java @@ -0,0 +1,54 @@ +package mrbind_test.mr.iostream; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IOStream::operator<<`. + * + * Calls `MR_C_print_MR_IOStream_A()`. + */ + public static void opLshift(mrbind_test.mr.cs.std_ostream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_print_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::IOStream::operator>>`. + * + * Calls `MR_C_input_MR_IOStream_A()`. + */ + public static void opRshift(mrbind_test.mr.cs.std_istream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_input_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java new file mode 100644 index 00000000..22ad7503 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java @@ -0,0 +1,220 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::A` elementwise. + * + * Calls `MR_LifetimeInference_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.lifetimeinference.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_A_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.A assignFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_LifetimeInference_A_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_LifetimeInference_A_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::A` named `x`. + * + * Calls `MR_LifetimeInference_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..86b3d2d6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,172 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::B` elementwise. + * + * Calls `MR_LifetimeInference_B_ConstructFrom()`. + */ + public B(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.lifetimeinference.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_B_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.B assignFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::B` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_B_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::B` named `x`. + * + * Calls `MR_LifetimeInference_B_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/C.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/C.java new file mode 100644 index 00000000..37e4387a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/C.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.lifetimeinference.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_C_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public C(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + this(__ctor_construct(_1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2, _3); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::LifetimeInference::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_C_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.C assignFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java new file mode 100644 index 00000000..615b8395 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.lifetimeinference; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::LifetimeInference::begin`. + * The reference to the parameter `a` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * The reference to the parameter `a` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::begin`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java/src/mrbind_test/mr/matchinglayout/A.java new file mode 100644 index 00000000..35f546e3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,96 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"a", "b", "c", "ll", "arr", "arr2d"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_FLOAT, mrbind_test.Ffi.C_LONG, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_INT))}); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_c = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("c")); + public static final long OFF_ll = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ll")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_arr2d = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr2d")); + // No layout check: this struct has platform-sized fields, and the sizes in the description JSON are for the platform the C bindings were generated on. + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + /** + * first + */ + public int a() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a);} + public void setA(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a, value);} + + /** + * second + */ + public short b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b);} + public void setB(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b, value);} + + /** + * third + */ + public float c() {return segment.get(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c);} + public void setC(float value) {segment.set(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c, value);} + + public long ll() {return mrbind_test.Ffi.getCLong(segment, OFF_ll);} + public void setLl(long value) {mrbind_test.Ffi.setCLong(segment, OFF_ll, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public int arr2d(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4);} + public void setArr2d(int i0, int i1, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4, value);} + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Returns a pointer to a member variable of class `MR::MatchingLayout::A` named `x`. + * + * Calls `MR_MatchingLayout_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Modifies a member variable of class `MR::MatchingLayout::A` named `x`. + * + * Calls `MR_MatchingLayout_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java/src/mrbind_test/mr/matchinglayout/B.java b/test/output_java/src/mrbind_test/mr/matchinglayout/B.java new file mode 100644 index 00000000..92b241f6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/B.java @@ -0,0 +1,59 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "a", "y"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, mrbind_test.mr.matchinglayout.A.LAYOUT, java.lang.foreign.ValueLayout.JAVA_BYTE}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + // No layout check: this struct has platform-sized fields, and the sizes in the description JSON are for the platform the C bindings were generated on. + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public B copy() {return new B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + public mrbind_test.mr.matchinglayout.A a() {return new mrbind_test.mr.matchinglayout.A(segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.matchinglayout.A value) {segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + public byte y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y);} + public void setY(byte value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y, value);} + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_MatchingLayout_B_DefaultConstruct()`. + */ + public B() + { + super(__ctor_defaultConstruct(), null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_B_DefaultConstruct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java new file mode 100644 index 00000000..87f7f26e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java @@ -0,0 +1,95 @@ +package mrbind_test.mr.matchinglayout; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::MatchingLayout::foo`. + * + * Calls `MR_MatchingLayout_foo()`. + */ + public static mrbind_test.mr.matchinglayout.B foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_foo.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.matchinglayout.B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::MatchingLayout::bar`. + * + * Calls `MR_MatchingLayout_bar()`. + */ + public static void bar(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::baz`. + * + * Calls `MR_MatchingLayout_baz()`. + */ + public static void baz(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_baz.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::bleh`. + * + * Calls `MR_MatchingLayout_bleh()`. + */ + public static mrbind_test.mr.matchinglayout.B bleh(mrbind_test.mr.matchinglayout.B _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bleh.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.matchinglayout.B(__ret.reinterpret(mrbind_test.mr.matchinglayout.B.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/membervars/A.java b/test/output_java/src/mrbind_test/mr/membervars/A.java new file mode 100644 index 00000000..cffa5dbf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,240 @@ +package mrbind_test.mr.membervars; + +/** + * Generated from class `MR::MemberVars::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::MemberVars::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_MemberVars_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.membervars.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.membervars.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `z`. + * + * Calls `MR_MemberVars_A_Get_z()`. + */ + public static int z() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `z`. + * + * Calls `MR_MemberVars_A_Set_z()`. + */ + public static void setZ(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `w`. + * + * Calls `MR_MemberVars_A_Get_w()`. + */ + public static int w() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `x`. + * + * Calls `MR_MemberVars_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_y()`. + */ + public int y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Those don't get setters, and also get only one (non-const-propagating) getter. + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Arrays don't get setters, because they aren't assignable. But they still get mutable getters + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::MemberVars::A` named `arr`. The size is `4`. + * + * Calls `MR_MemberVars_A_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int.java b/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int.java new file mode 100644 index 00000000..701c37e6 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * Generated from class `MR::NestedTemplateInst::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java b/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java new file mode 100644 index 00000000..b50cec21 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * This struct needs special care to be instantiated, even with the typedef below. Hmm. + * Generated from class `MR::NestedTemplateInst::A::AA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int_AA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int_AA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int_AA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct()`. + */ + public A_int_AA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::AA::AA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother()`. + */ + public A_int_AA_float(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::AA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int_AA_float assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int_AA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java/src/mrbind_test/mr/nestedtypes/A.java new file mode 100644 index 00000000..d1919edf --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::NestedTypes::A` elementwise. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `e` might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFrom()`. + */ + public A(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + this(__ctor_constructFrom(b, e), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b"), java.util.Objects.requireNonNull(e, "e").value); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.nestedtypes.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A assignFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_b()`. + */ + public mrbind_test.mr.nestedtypes.A_B b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_NestedTypes_A_Set_b()`. + */ + public void setB(mrbind_test.mr.nestedtypes.A_B value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_e()`. + */ + public mrbind_test.mr.nestedtypes.A_E e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_NestedTypes_A_Set_e()`. + */ + public void setE(mrbind_test.mr.nestedtypes.A_E value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/nestedtypes/A_B.java b/test/output_java/src/mrbind_test/mr/nestedtypes/A_B.java new file mode 100644 index 00000000..4253b30d --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtypes/A_B.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_B_DefaultConstruct()`. + */ + public A_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_B_ConstructFromAnother()`. + */ + public A_B(mrbind_test.mr.nestedtypes.A_B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_B_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A_B assignFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/nestedtypes/A_E.java b/test/output_java/src/mrbind_test/mr/nestedtypes/A_E.java new file mode 100644 index 00000000..ba6e21dc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/nestedtypes/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.nestedtypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java new file mode 100644 index 00000000..cbc9b855 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_float_DefaultConstruct()`. + */ + public A_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_ConstructFromAnother()`. + */ + public A_float(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_float assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java new file mode 100644 index 00000000..8248e5c7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -0,0 +1,150 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_int assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_int()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator-`. + * + * Calls `MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opSub(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java new file mode 100644 index 00000000..2602059a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -0,0 +1,181 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::b`. + * + * Calls `MR_OmittingTargsAndQuals_b()`. + */ + public static void b(mrbind_test.mr.omittingtargsandquals.A_int _1, mrbind_test.mr.omittingtargsandquals.A_float _2) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_b.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator*`. + * + * Calls `MR_C_deref_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void opMul(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_deref_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator~`. + * + * Calls `MR_C_compl_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void opCompl(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_compl_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::c`. + * + * Calls `MR_OmittingTargsAndQuals_c()`. + */ + public static void c(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_c.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::d`. + * + * Calls `MR_OmittingTargsAndQuals_d()`. + */ + public static void d(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_d.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::inst`. + * + * Calls `MR_OmittingTargsAndQuals_inst()`. + */ + public static void inst() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_inst.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/A.java b/test/output_java/src/mrbind_test/mr/overloadedops/A.java new file mode 100644 index 00000000..abcdba9a --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloadedops/A.java @@ -0,0 +1,1147 @@ +package mrbind_test.mr.overloadedops; + +/** + * Member functions. + * Generated from class `MR::OverloadedOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Since we have a custom assignment, we also need a custom copy ctor to avoid the deprecation warning. + * Generated from constructor `MR::OverloadedOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.overloadedops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Assign. + * Generated from method `MR::OverloadedOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_A_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Unary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_A()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_A()`. + */ + public int opAdd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Unary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_A()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_A()`. + */ + public int opSub(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Dereference (unary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_A()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Multiply (binary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_A()`. + */ + public int opMul(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide. + * Generated from method `MR::OverloadedOps::A::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_A()`. + */ + public int opDiv(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo. + * Generated from method `MR::OverloadedOps::A::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_A()`. + */ + public int opMod(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor. + * Generated from method `MR::OverloadedOps::A::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_A()`. + */ + public int opXor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and. + * Generated from method `MR::OverloadedOps::A::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_A()`. + */ + public int opBitand(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or. + * Generated from method `MR::OverloadedOps::A::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_A()`. + */ + public int opBitor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit negate. + * Generated from method `MR::OverloadedOps::A::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_A()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Boolean negate. + * Generated from method `MR::OverloadedOps::A::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_A()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Less. + * Generated from method `MR::OverloadedOps::A::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_A()`. + */ + public int opLess(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater. + * Generated from method `MR::OverloadedOps::A::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_A()`. + */ + public int opGreater(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Plus assign. + * Generated from method `MR::OverloadedOps::A::operator+=`. + * + * Calls `MR_OverloadedOps_A_add_assign()`. + */ + public int add_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Minus assign. + * Generated from method `MR::OverloadedOps::A::operator-=`. + * + * Calls `MR_OverloadedOps_A_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply assign. + * Generated from method `MR::OverloadedOps::A::operator*=`. + * + * Calls `MR_OverloadedOps_A_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide assign. + * Generated from method `MR::OverloadedOps::A::operator/=`. + * + * Calls `MR_OverloadedOps_A_div_assign()`. + */ + public int div_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo assign. + * Generated from method `MR::OverloadedOps::A::operator%=`. + * + * Calls `MR_OverloadedOps_A_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor assign. + * Generated from method `MR::OverloadedOps::A::operator^=`. + * + * Calls `MR_OverloadedOps_A_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and assign. + * Generated from method `MR::OverloadedOps::A::operator&=`. + * + * Calls `MR_OverloadedOps_A_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or assign. + * Generated from method `MR::OverloadedOps::A::operator|=`. + * + * Calls `MR_OverloadedOps_A_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift. + * Generated from method `MR::OverloadedOps::A::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_A()`. + */ + public int opLshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift. + * Generated from method `MR::OverloadedOps::A::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_A()`. + */ + public int opRshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift assign. + * Generated from method `MR::OverloadedOps::A::operator<<=`. + * + * Calls `MR_OverloadedOps_A_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift assign. + * Generated from method `MR::OverloadedOps::A::operator>>=`. + * + * Calls `MR_OverloadedOps_A_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Equal. + * Generated from method `MR::OverloadedOps::A::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_A()`. + */ + public int opEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Not equal. + * Generated from method `MR::OverloadedOps::A::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_A()`. + */ + public int opNotEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Less equal. + * Generated from method `MR::OverloadedOps::A::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_A()`. + */ + public int opLessEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater equal. + * Generated from method `MR::OverloadedOps::A::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_A()`. + */ + public int opGreaterEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Compare three way. + * Generated from method `MR::OverloadedOps::A::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_A()`. + */ + public int opCompareThreeWay(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And. + * Generated from method `MR::OverloadedOps::A::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_A()`. + */ + public int opAnd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Or. + * Generated from method `MR::OverloadedOps::A::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_A()`. + */ + public int opOr(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_A()`. + */ + public int opIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_A()`. + */ + public int opPostIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Pre-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_A()`. + */ + public int opDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_A()`. + */ + public int opPostDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Comma. + * Generated from method `MR::OverloadedOps::A::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_A()`. + */ + public int opComma(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow star. + * Generated from method `MR::OverloadedOps::A::operator->*`. + * + * Calls `MR_OverloadedOps_A_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow. + * Generated from method `MR::OverloadedOps::A::operator->`. + * + * Calls `MR_OverloadedOps_A_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Function call. + * Generated from method `MR::OverloadedOps::A::operator()`. + * + * Calls `MR_OverloadedOps_A_call()`. + */ + public int call(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Indexing. + * Generated from method `MR::OverloadedOps::A::operator[]`. + * + * Calls `MR_OverloadedOps_A_index()`. + */ + public int index(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/B.java b/test/output_java/src/mrbind_test/mr/overloadedops/B.java new file mode 100644 index 00000000..1561199c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloadedops/B.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.overloadedops; + +/** + * Free functions. + * Generated from class `MR::OverloadedOps::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.overloadedops.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_B_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.B assignFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/C.java b/test/output_java/src/mrbind_test/mr/overloadedops/C.java new file mode 100644 index 00000000..8aa8c8e3 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloadedops/C.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.overloadedops; + +/** + * Test how the names are generated. + * Generated from class `MR::OverloadedOps::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.overloadedops.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_C_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.C assignFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/D.java b/test/output_java/src/mrbind_test/mr/overloadedops/D.java new file mode 100644 index 00000000..f887d23c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloadedops/D.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.overloadedops; + +/** + * Generated from class `MR::OverloadedOps::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.overloadedops.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_D_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.D assignFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Disambiguating the names. + * Generated from method `MR::OverloadedOps::D::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator*`. + * + * Calls `MR_C_deref_const_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_const_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java new file mode 100644 index 00000000..a3eb40ed --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java @@ -0,0 +1,1095 @@ +package mrbind_test.mr.overloadedops; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Unary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Unary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Dereference (unary star). + * Generated from function `MR::OverloadedOps::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply (binary star). + * Generated from function `MR::OverloadedOps::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide. + * Generated from function `MR::OverloadedOps::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_B()`. + */ + public static int opDiv(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo. + * Generated from function `MR::OverloadedOps::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_B()`. + */ + public static int opMod(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor. + * Generated from function `MR::OverloadedOps::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_B()`. + */ + public static int opXor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and. + * Generated from function `MR::OverloadedOps::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_B()`. + */ + public static int opBitand(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or. + * Generated from function `MR::OverloadedOps::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_B()`. + */ + public static int opBitor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit negate. + * Generated from function `MR::OverloadedOps::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_B()`. + */ + public static int opCompl(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Boolean negate. + * Generated from function `MR::OverloadedOps::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_B()`. + */ + public static int opNot(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Assign. + * friend int operator=(B, B); // Can't be a free function. + * Less. + * Generated from function `MR::OverloadedOps::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_B()`. + */ + public static int opLess(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater. + * Generated from function `MR::OverloadedOps::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_B()`. + */ + public static int opGreater(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Plus assign. + * Generated from function `MR::OverloadedOps::operator+=`. + * + * Calls `MR_C_add_assign_MR_OverloadedOps_B()`. + */ + public static int opAddAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Minus assign. + * Generated from function `MR::OverloadedOps::operator-=`. + * + * Calls `MR_C_sub_assign_MR_OverloadedOps_B()`. + */ + public static int opSubAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Multiply assign. + * Generated from function `MR::OverloadedOps::operator*=`. + * + * Calls `MR_C_mul_assign_MR_OverloadedOps_B()`. + */ + public static int opMulAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide assign. + * Generated from function `MR::OverloadedOps::operator/=`. + * + * Calls `MR_C_div_assign_MR_OverloadedOps_B()`. + */ + public static int opDivAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo assign. + * Generated from function `MR::OverloadedOps::operator%=`. + * + * Calls `MR_C_mod_assign_MR_OverloadedOps_B()`. + */ + public static int opModAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor assign. + * Generated from function `MR::OverloadedOps::operator^=`. + * + * Calls `MR_C_xor_assign_MR_OverloadedOps_B()`. + */ + public static int opXorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and assign. + * Generated from function `MR::OverloadedOps::operator&=`. + * + * Calls `MR_C_bitand_assign_MR_OverloadedOps_B()`. + */ + public static int opBitandAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or assign. + * Generated from function `MR::OverloadedOps::operator|=`. + * + * Calls `MR_C_bitor_assign_MR_OverloadedOps_B()`. + */ + public static int opBitorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift. + * Generated from function `MR::OverloadedOps::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_B()`. + */ + public static int opLshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift. + * Generated from function `MR::OverloadedOps::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_B()`. + */ + public static int opRshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift assign. + * Generated from function `MR::OverloadedOps::operator<<=`. + * + * Calls `MR_C_lshift_assign_MR_OverloadedOps_B()`. + */ + public static int opLshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift assign. + * Generated from function `MR::OverloadedOps::operator>>=`. + * + * Calls `MR_C_rshift_assign_MR_OverloadedOps_B()`. + */ + public static int opRshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Equal. + * Generated from function `MR::OverloadedOps::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_B()`. + */ + public static int opEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Not equal. + * Generated from function `MR::OverloadedOps::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_B()`. + */ + public static int opNotEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Less equal. + * Generated from function `MR::OverloadedOps::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_B()`. + */ + public static int opLessEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater equal. + * Generated from function `MR::OverloadedOps::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_B()`. + */ + public static int opGreaterEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Compare three way. + * Generated from function `MR::OverloadedOps::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_B()`. + */ + public static int opCompareThreeWay(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * And. + * Generated from function `MR::OverloadedOps::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_B()`. + */ + public static int opAnd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Or. + * Generated from function `MR::OverloadedOps::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_B()`. + */ + public static int opOr(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Pre-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_B()`. + */ + public static int opIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_B()`. + */ + public static int opPostIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_B()`. + */ + public static int opDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_B()`. + */ + public static int opPostDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Comma. + * Generated from function `MR::OverloadedOps::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_B()`. + */ + public static int opComma(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Arrow star. + * Generated from function `MR::OverloadedOps::operator->*`. + * + * Calls `MR_C_arrow_star_MR_OverloadedOps_B()`. + */ + public static int opArrowStar(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_arrow_star_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * If rhs type is same as the lhs one (ignoring cvref), it's not emitted. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.C _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * But different types are printed. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_const_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_const_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_const_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/overloads/Functions.java b/test/output_java/src/mrbind_test/mr/overloads/Functions.java new file mode 100644 index 00000000..7d9045a5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/overloads/Functions.java @@ -0,0 +1,263 @@ +package mrbind_test.mr.overloads; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_1()`. + */ + public static void a(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_1.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_2()`. + */ + public static void a(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_2.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_int()`. + */ + public static void b_int() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_int.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_float()`. + */ + public static void b_float() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_int()`. + */ + public static void c(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_float()`. + */ + public static void c(float _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_int()`. + */ + public static void d(byte _1, int _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_int.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_float()`. + */ + public static void d(byte _1, float _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_float.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_const_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e(int _1, java.lang.foreign.MemorySegment _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int_rvalue_ref_int()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int_rvalue_ref_int(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_int.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int_rvalue_ref_float()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int_rvalue_ref_float(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This is a fun testcase. Here we must not omit cvref on the first parameter, even if it partially helps with disambiguation, + * because that ultimately leads to an ambiguity. + * So we can only omit cvref if each function has cvref in that parameter). + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_float()`. + */ + public static void f(float _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_int_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void f(java.lang.foreign.MemorySegment _1, float _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_int_rvalue_ref.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_const_int_ref()`. + */ + public static void f(int _1, float _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/phmap/Functions.java b/test/output_java/src/mrbind_test/mr/phmap/Functions.java new file mode 100644 index 00000000..27781a01 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/phmap/Functions.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.phmap; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multiset_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multiset_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multiset_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multimap_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multimap_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multimap_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/signaturefilters/A.java b/test/output_java/src/mrbind_test/mr/signaturefilters/A.java new file mode 100644 index 00000000..9e86234c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/A.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.signaturefilters.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_A_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.A assignFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java new file mode 100644 index 00000000..cf766b5f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::Blah`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Blah extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Blah(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Blah::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_Blah_DefaultConstruct()`. + */ + public Blah() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::Blah::Blah`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_Blah_ConstructFromAnother()`. + */ + public Blah(mrbind_test.mr.signaturefilters.Blah _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::Blah::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_Blah_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.Blah assignFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.Blah(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_SignatureFilters_Blah_Get_a()`. + */ + public mrbind_test.mr.signaturefilters.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_SignatureFilters_Blah_Set_a()`. + */ + public void setA(mrbind_test.mr.signaturefilters.A value) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java new file mode 100644 index 00000000..c870a007 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.signaturefilters; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_1()`. + */ + public static void foo(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.signaturefilters.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_1()`. + */ + public static void foo2(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_0.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_1()`. + */ + public static void foo3(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_0.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_1()`. + */ + public static void foo4(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_0.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_1()`. + */ + public static void foo5(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_0.invokeExact(); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java/src/mrbind_test/mr/staticfuncs/A.java new file mode 100644 index 00000000..fb1a04bd --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,157 @@ +package mrbind_test.mr.staticfuncs; + +/** + * Generated from class `MR::StaticFuncs::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StaticFuncs_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StaticFuncs::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StaticFuncs_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.staticfuncs.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StaticFuncs_A_AssignFromAnother()`. + */ + public mrbind_test.mr.staticfuncs.A assignFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.staticfuncs.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::blah`. + * + * Calls `MR_StaticFuncs_A_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_blah.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StaticFuncs::A` named `x`. + * + * Calls `MR_StaticFuncs_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::StaticFuncs::A` named `x`. + * + * Calls `MR_StaticFuncs_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdcontainers/A.java b/test/output_java/src/mrbind_test/mr/stdcontainers/A.java new file mode 100644 index 00000000..21eb8fd7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdcontainers/A.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.stdcontainers; + +/** + * `std::array` behaves differently with simple types. + * Generated from class `MR::StdContainers::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdcontainers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.A assignFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java new file mode 100644 index 00000000..5af5977b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java @@ -0,0 +1,783 @@ +package mrbind_test.mr.stdcontainers; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdContainers::Set`. + * + * Calls `MR_StdContainers_Set()`. + */ + public static void Set(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Set.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::SetWithDefault`. + * + * Calls `MR_StdContainers_SetWithDefault()`. + */ + public static void SetWithDefault(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_SetWithDefault.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::Get`. + * + * Calls `MR_StdContainers_Get()`. + */ + public static mrbind_test.mr.cs.std_vector_int Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Get.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToRef`. + * + * Calls `MR_StdContainers_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToPtr`. + * + * Calls `MR_StdContainers_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRef`. + * + * Calls `MR_StdContainers_ConstRef()`. + */ + public static void ConstRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::RvalueRef`. + * + * Calls `MR_StdContainers_RvalueRef()`. + */ + public static void RvalueRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_RvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRvalueRef`. + * + * Calls `MR_StdContainers_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Just the list of other containers. + * Generated from function `MR::StdContainers::GetDeque`. + * + * Calls `MR_StdContainers_GetDeque()`. + */ + public static mrbind_test.mr.cs.std_deque_int GetDeque() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDeque.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetList`. + * + * Calls `MR_StdContainers_GetList()`. + */ + public static mrbind_test.mr.cs.std_list_int GetList() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetList.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSet`. + * + * Calls `MR_StdContainers_GetSet()`. + */ + public static mrbind_test.mr.cs.std_set_int GetSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSet.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSet`. + * + * Calls `MR_StdContainers_GetMultiSet()`. + */ + public static mrbind_test.mr.cs.std_multiset_int GetMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSet`. + * + * Calls `MR_StdContainers_GetUnorderedSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_int GetUnorderedSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSet.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSet`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_int GetUnorderedMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMap`. + * + * Calls `MR_StdContainers_GetMap()`. + */ + public static mrbind_test.mr.cs.std_map_int_float GetMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMap.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMap`. + * + * Calls `MR_StdContainers_GetMultiMap()`. + */ + public static mrbind_test.mr.cs.std_multimap_int_float GetMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMap`. + * + * Calls `MR_StdContainers_GetUnorderedMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_int_float GetUnorderedMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMap.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMap`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_int_float GetUnorderedMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArray`. + * + * Calls `MR_StdContainers_GetStdArray()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 GetStdArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArray.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_A_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArraySimple`. + * + * Calls `MR_StdContainers_GetStdArraySimple()`. + */ + public static mrbind_test.mr.cs.std_array_int_43 GetStdArraySimple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArraySimple.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_array_int_43(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The custom simple array needs a bit more testing: + * Generated from function `MR::StdContainers::StdArraySimpleParam`. + * + * Calls `MR_StdContainers_StdArraySimpleParam()`. + */ + public static void StdArraySimpleParam(mrbind_test.mr.cs.std_array_int_43 _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimpleParam.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::StdArraySimplePtr`. + * + * Calls `MR_StdContainers_StdArraySimplePtr()`. + */ + public static mrbind_test.mr.cs.std_array_int_43 StdArraySimplePtr(mrbind_test.mr.cs.std_array_int_43 param) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimplePtr.invokeExact(mrbind_test.Ffi.ptr(param)); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = param; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_array_int_43(__ret.reinterpret(mrbind_test.mr.cs.std_array_int_43.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(param); + } + } + + /** + * For this `std::multiset` specialization, mention all iterators so that they get merged. + * Generated from function `MR::StdContainers::GetMultiSetWithMergedIters`. + * + * Calls `MR_StdContainers_GetMultiSetWithMergedIters()`. + */ + public static mrbind_test.mr.cs.std_multiset_float GetMultiSetWithMergedIters() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetWithMergedIters.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIter`. + * + * Calls `MR_StdContainers_GetMergedIter()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIter() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIter.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIterConst`. + * + * Calls `MR_StdContainers_GetMergedIterConst()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIterConst() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIterConst.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::NonDefCon`. + * + * Calls `MR_StdContainers_NonDefCon()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible NonDefCon() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefCon.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetVectorNA`. + * + * Calls `MR_StdContainers_GetVectorNA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable GetVectorNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetVectorNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetDequeNA`. + * + * Calls `MR_StdContainers_GetDequeNA()`. + */ + public static mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable GetDequeNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDequeNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetListNA`. + * + * Calls `MR_StdContainers_GetListNA()`. + */ + public static mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable GetListNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetListNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSetNA`. + * + * Calls `MR_StdContainers_GetSetNA()`. + */ + public static mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable GetSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSetNA`. + * + * Calls `MR_StdContainers_GetMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable GetMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable GetUnorderedSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable GetUnorderedMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMapNA`. + * + * Calls `MR_StdContainers_GetMapNA()`. + */ + public static mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float GetMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMapNA`. + * + * Calls `MR_StdContainers_GetMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float GetMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float GetUnorderedMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float GetUnorderedMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArrayNA`. + * + * Calls `MR_StdContainers_GetStdArrayNA()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42 GetStdArrayNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayNA.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Fun stuff! + * The type name is a bit weird for this, but at least it works. + * Generated from function `MR::StdContainers::GetStdArrayOfPlainArray`. + * + * Calls `MR_StdContainers_GetStdArrayOfPlainArray()`. + */ + public static mrbind_test.mr.cs.std_array_int_array_4_array_3_5 GetStdArrayOfPlainArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayOfPlainArray.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_array_int_array_4_array_3_5(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdcontainers/NonAssignable.java b/test/output_java/src/mrbind_test/mr/stdcontainers/NonAssignable.java new file mode 100644 index 00000000..97014ce9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdcontainers/NonAssignable.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.stdcontainers; + +/** + * A non-assignable type? + * Generated from class `MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonAssignable::NonAssignable`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public NonAssignable(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator<`. + * + * Calls `MR_C_less_MR_StdContainers_NonAssignable()`. + */ + public boolean opLess(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_less_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator==`. + * + * Calls `MR_C_equal_MR_StdContainers_NonAssignable()`. + */ + public boolean opEqual(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_equal_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java b/test/output_java/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java new file mode 100644 index 00000000..7ebb4887 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.stdcontainers; + +/** + * Test vectors of a non-default-constructible type. + * Generated from class `MR::StdContainers::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * + * Calls `MR_StdContainers_NonDefaultConstructible_Construct()`. + */ + public NonDefaultConstructible(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::StdContainers::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible assignFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java new file mode 100644 index 00000000..4afdad89 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java @@ -0,0 +1,241 @@ +package mrbind_test.mr.stdexpected; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdExpected::GetExp`. + * + * Calls `MR_StdExpected_GetExp()`. + */ + public static mrbind_test.mr.cs.std_expected_int_std_string GetExp() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExp.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExp`. + * + * Calls `MR_StdExpected_SetExp()`. + */ + public static void SetExp(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExp.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpConstRef`. + * + * Calls `MR_StdExpected_SetExpConstRef()`. + */ + public static void SetExpConstRef(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDefTrivial`. + * + * Calls `MR_StdExpected_SetExpDefTrivial()`. + */ + public static void SetExpDefTrivial(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDef`. + * + * Calls `MR_StdExpected_SetExpDef()`. + */ + public static void SetExpDef(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVoid`. + * + * Calls `MR_StdExpected_GetExpVoid()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float GetExpVoid() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVoid.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoid`. + * + * Calls `MR_StdExpected_SetExpVoid()`. + */ + public static void SetExpVoid(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoid.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidConstRef`. + * + * Calls `MR_StdExpected_SetExpVoidConstRef()`. + */ + public static void SetExpVoidConstRef(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDefTrivial`. + * + * Calls `MR_StdExpected_SetExpVoidDefTrivial()`. + */ + public static void SetExpVoidDefTrivial(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDefTrivial.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDef`. + * + * Calls `MR_StdExpected_SetExpVoidDef()`. + */ + public static void SetExpVoidDef(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVec`. + * + * Calls `MR_StdExpected_GetExpVec()`. + */ + public static mrbind_test.mr.cs.std_vector_std_expected_int_std_string GetExpVec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVec.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java new file mode 100644 index 00000000..42d154e8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.stdfilesystem; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFilesystem::GetPath`. + * + * Calls `MR_StdFilesystem_GetPath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path GetPath() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_GetPath.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPath`. + * + * Calls `MR_StdFilesystem_SetPath()`. + */ + public static void SetPath(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPath.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathConstRef`. + * + * Calls `MR_StdFilesystem_SetPathConstRef()`. + */ + public static void SetPathConstRef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathConstRef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDefTrivial`. + * + * Calls `MR_StdFilesystem_SetPathDefTrivial()`. + */ + public static void SetPathDefTrivial(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDefTrivial.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDef`. + * + * Calls `MR_StdFilesystem_SetPathDef()`. + */ + public static void SetPathDef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdfunction/A.java b/test/output_java/src/mrbind_test/mr/stdfunction/A.java new file mode 100644 index 00000000..bbe00cf5 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,177 @@ +package mrbind_test.mr.stdfunction; + +/** + * Generated from class `MR::StdFunction::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdFunction_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdFunction::A` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFrom()`. + */ + public A(java.lang.String a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String a) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFrom.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdFunction::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdfunction.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdFunction::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdFunction_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdfunction.A assignFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdfunction.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdFunction::A` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdFunction_A_Get_a()`. + */ + public mrbind_test.mr.cs.std_string a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdFunction::A` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_StdFunction_A_Set_a()`. + */ + public void setA(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdfunction/E.java b/test/output_java/src/mrbind_test/mr/stdfunction/E.java new file mode 100644 index 00000000..bd6df766 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdfunction/E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.stdfunction; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java new file mode 100644 index 00000000..013bfc39 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java @@ -0,0 +1,184 @@ +package mrbind_test.mr.stdfunction; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_int_int()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_int_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int_func_from_int_int()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int_from_int_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_std_string_func_from_int_float()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_std_string_from_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_std_string_func_from_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_std_string()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_std_string.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_A_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_A_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/A.java b/test/output_java/src/mrbind_test/mr/stdoptional/A.java new file mode 100644 index 00000000..77e7887e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::A` elementwise. + * + * Calls `MR_StdOptional_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdoptional.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::A` named `x`. + * + * Calls `MR_StdOptional_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/B.java b/test/output_java/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..e1782c33 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,175 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::B` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFrom()`. + */ + public B(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.stdoptional.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_B_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::B` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_B_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::B` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_StdOptional_B_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/E.java b/test/output_java/src/mrbind_test/mr/stdoptional/E.java new file mode 100644 index 00000000..8049e526 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.stdoptional; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java new file mode 100644 index 00000000..9cb57d65 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java @@ -0,0 +1,412 @@ +package mrbind_test.mr.stdoptional; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdOptional::GetInt`. + * + * Calls `MR_StdOptional_GetInt()`. + */ + public static mrbind_test.mr.cs.std_optional_int GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetInt`. + * + * Calls `MR_StdOptional_SetInt()`. + */ + public static void SetInt(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetInt.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntConstRef`. + * + * Calls `MR_StdOptional_SetIntConstRef()`. + */ + public static void SetIntConstRef(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDefTrivial`. + * + * Calls `MR_StdOptional_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDef`. + * + * Calls `MR_StdOptional_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_optional_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetEnum`. + * + * Calls `MR_StdOptional_GetEnum()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_E GetEnum() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnum`. + * + * Calls `MR_StdOptional_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnum.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumConstRef`. + * + * Calls `MR_StdOptional_SetEnumConstRef()`. + */ + public static void SetEnumConstRef(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDefTrivial`. + * + * Calls `MR_StdOptional_SetEnumDefTrivial()`. + */ + public static void SetEnumDefTrivial(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDef`. + * + * Calls `MR_StdOptional_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass`. + * + * Calls `MR_StdOptional_GetClass()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass`. + * + * Calls `MR_StdOptional_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassConstRef`. + * + * Calls `MR_StdOptional_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDefTrivial`. + * + * Calls `MR_StdOptional_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDefTrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDef`. + * + * Calls `MR_StdOptional_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass2`. + * + * Calls `MR_StdOptional_GetClass2()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_B GetClass2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass2.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_B(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2`. + * + * Calls `MR_StdOptional_SetClass2()`. + */ + public static void SetClass2(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2ConstRef`. + * + * Calls `MR_StdOptional_SetClass2ConstRef()`. + */ + public static void SetClass2ConstRef(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2ConstRef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2DefTrivial`. + * + * Calls `MR_StdOptional_SetClass2DefTrivial()`. + */ + public static void SetClass2DefTrivial(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2Def`. + * + * Calls `MR_StdOptional_SetClass2Def()`. + */ + public static void SetClass2Def(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdsharedptr/A.java b/test/output_java/src/mrbind_test/mr/stdsharedptr/A.java new file mode 100644 index 00000000..42f38dc8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdsharedptr/A.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.stdsharedptr; + +/** + * Now with a class: + * Generated from class `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdSharedPtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdsharedptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdSharedPtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdsharedptr.A assignFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java new file mode 100644 index 00000000..5ad9b302 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -0,0 +1,854 @@ +package mrbind_test.mr.stdsharedptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdSharedPtr::GetInt`. + * + * Calls `MR_StdSharedPtr_GetInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetInt`. + * + * Calls `MR_StdSharedPtr_SetInt()`. + */ + public static void SetInt(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetInt.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDef`. + * + * Calls `MR_StdSharedPtr_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueRef()`. + */ + public static void SetIntRvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueConstRef()`. + */ + public static void SetIntRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr`. + * + * Calls `MR_StdSharedPtr_GetIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr`. + * + * Calls `MR_StdSharedPtr_SetIntArr()`. + */ + public static void SetIntArr(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArrDefTrivial()`. + */ + public static void SetIntArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDef`. + * + * Calls `MR_StdSharedPtr_SetIntArrDef()`. + */ + public static void SetIntArrDef(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr42`. + * + * Calls `MR_StdSharedPtr_GetIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 GetIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42`. + * + * Calls `MR_StdSharedPtr_SetIntArr42()`. + */ + public static void SetIntArr42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArr42DefTrivial()`. + */ + public static void SetIntArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42Def`. + * + * Calls `MR_StdSharedPtr_SetIntArr42Def()`. + */ + public static void SetIntArr42Def(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClass`. + * + * Calls `MR_StdSharedPtr_GetClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClass`. + * + * Calls `MR_StdSharedPtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClass.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDef`. + * + * Calls `MR_StdSharedPtr_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr`. + * + * Calls `MR_StdSharedPtr_GetClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr`. + * + * Calls `MR_StdSharedPtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDef`. + * + * Calls `MR_StdSharedPtr_SetClassArrDef()`. + */ + public static void SetClassArrDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr42`. + * + * Calls `MR_StdSharedPtr_GetClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 GetClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42`. + * + * Calls `MR_StdSharedPtr_SetClassArr42()`. + */ + public static void SetClassArr42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArr42DefTrivial()`. + */ + public static void SetClassArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42Def`. + * + * Calls `MR_StdSharedPtr_SetClassArr42Def()`. + */ + public static void SetClassArr42Def(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * With constness: + * Try const element types: + * Generated from function `MR::StdSharedPtr::GetConstInt`. + * + * Calls `MR_StdSharedPtr_GetConstInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int_array GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr42`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 GetConstIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClass`. + * + * Calls `MR_StdSharedPtr_GetConstClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr42`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 GetConstClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java/src/mrbind_test/mr/stdstring/Functions.java new file mode 100644 index 00000000..0b13f2c0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdstring/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstring; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdString::Set`. + * + * Calls `MR_StdString_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::SetWithDefault`. + * + * Calls `MR_StdString_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::Get`. + * + * Calls `MR_StdString_Get()`. + */ + public static mrbind_test.mr.cs.std_string Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Get.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::WriteToRef`. + * + * Calls `MR_StdString_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string ref) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdString::WriteToPtr`. + * + * Calls `MR_StdString_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdString::ConstRef`. + * + * Calls `MR_StdString_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::RvalueRef`. + * + * Calls `MR_StdString_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::ConstRvalueRef`. + * + * Calls `MR_StdString_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java new file mode 100644 index 00000000..5c81e21c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.stdstringview; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdStringView::Set`. + * + * Calls `MR_StdStringView_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::SetWithDefault`. + * + * Calls `MR_StdStringView_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::Get`. + * + * Calls `MR_StdStringView_Get()`. + */ + public static mrbind_test.mr.cs.std_string_view Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Get.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToRef`. + * + * Calls `MR_StdStringView_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string_view ref) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToPtr`. + * + * Calls `MR_StdStringView_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string_view ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRef`. + * + * Calls `MR_StdStringView_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::RvalueRef`. + * + * Calls `MR_StdStringView_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRvalueRef`. + * + * Calls `MR_StdStringView_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java new file mode 100644 index 00000000..6a342caa --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -0,0 +1,243 @@ +package mrbind_test.mr.stdtuplelike; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdTupleLike::SetPair`. + * + * Calls `MR_StdTupleLike_SetPair()`. + */ + public static void SetPair(mrbind_test.mr.cs.std_pair_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetPair.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair`. + * + * Calls `MR_StdTupleLike_GetPair()`. + */ + public static mrbind_test.mr.cs.std_pair_int_float GetPair() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair2`. + * + * Calls `MR_StdTupleLike_GetPair2()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_float GetPair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair2.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair3`. + * + * Calls `MR_StdTupleLike_GetPair3()`. + */ + public static mrbind_test.mr.cs.std_pair_int_ref_float_ref GetPair3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair3.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_int_ref_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair4`. + * + * Calls `MR_StdTupleLike_GetPair4()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref GetPair4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair4.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair5`. + * + * Calls `MR_StdTupleLike_GetPair5()`. + */ + public static mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref GetPair5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair5.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair6`. + * + * Calls `MR_StdTupleLike_GetPair6()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref GetPair6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair6.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::SetTuple`. + * + * Calls `MR_StdTupleLike_SetTuple()`. + */ + public static void SetTuple(mrbind_test.mr.cs.std_tuple_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetTuple.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple`. + * + * Calls `MR_StdTupleLike_GetTuple()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_float GetTuple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Three separate tuples to avoid generating file paths that are too long, as those cause issues on some filesystems apparently. + * Generated from function `MR::StdTupleLike::GetTuple2`. + * + * Calls `MR_StdTupleLike_GetTuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a GetTuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple2.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple7`. + * + * Calls `MR_StdTupleLike_GetTuple7()`. + */ + public static mrbind_test.mr.cs.std_tuple GetTuple7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple7.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple8`. + * + * Calls `MR_StdTupleLike_GetTuple8()`. + */ + public static mrbind_test.mr.cs.std_tuple_float_double_int_int GetTuple8() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple8.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_tuple_float_double_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stduniqueptr/A.java b/test/output_java/src/mrbind_test/mr/stduniqueptr/A.java new file mode 100644 index 00000000..713529bc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stduniqueptr/A.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.stduniqueptr; + +/** + * Now with a class: + * Generated from class `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdUniquePtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stduniqueptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdUniquePtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stduniqueptr.A assignFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java new file mode 100644 index 00000000..44dcaa7f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -0,0 +1,629 @@ +package mrbind_test.mr.stduniqueptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdUniquePtr::GetInt`. + * + * Calls `MR_StdUniquePtr_GetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetInt`. + * + * Calls `MR_StdUniquePtr_SetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetInt(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDef`. + * + * Calls `MR_StdUniquePtr_SetIntDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueConstRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueConstRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueConstRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetIntArr`. + * + * Calls `MR_StdUniquePtr_GetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArr`. + * + * Calls `MR_StdUniquePtr_SetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntArrDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDef`. + * + * Calls `MR_StdUniquePtr_SetIntArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClass`. + * + * Calls `MR_StdUniquePtr_GetClass()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClass`. + * + * Calls `MR_StdUniquePtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClass.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDef`. + * + * Calls `MR_StdUniquePtr_SetClassDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueConstRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClassArr`. + * + * Calls `MR_StdUniquePtr_GetClassArr()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArr`. + * + * Calls `MR_StdUniquePtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArr.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDef`. + * + * Calls `MR_StdUniquePtr_SetClassArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try const element types: + * Generated from function `MR::StdUniquePtr::GetConstInt`. + * + * Calls `MR_StdUniquePtr_GetConstInt()`. + */ + public static int GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstIntArr`. + * + * Calls `MR_StdUniquePtr_GetConstIntArr()`. + */ + public static int GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClass`. + * + * Calls `MR_StdUniquePtr_GetConstClass()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClassArr`. + * + * Calls `MR_StdUniquePtr_GetConstClassArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Here `std::unique_ptr` never gets emitted as an actual type (since we don't have non-null default arguments), so its header should not be emitted. + * Generated from function `MR::StdUniquePtr::GetFloat`. + * + * Calls `MR_StdUniquePtr_GetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetFloat() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetFloat.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloat`. + * + * Calls `MR_StdUniquePtr_SetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloat(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloat.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloatDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetFloatDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloatDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloatDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java new file mode 100644 index 00000000..0b97cba8 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java @@ -0,0 +1,90 @@ +package mrbind_test.mr.stdvariant; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdVariant::foo`. + * + * Calls `MR_StdVariant_foo()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_foo.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdVariant::bar`. + * + * Calls `MR_StdVariant_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_variant_int_float_float _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::baz`. + * + * Calls `MR_StdVariant_baz()`. + */ + public static void baz(mrbind_test.mr.cs.std_variant_int_float_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_baz.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::blah`. + * + * Calls `MR_StdVariant_blah()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_blah.invokeExact(); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/tags/Functions.java b/test/output_java/src/mrbind_test/mr/tags/Functions.java new file mode 100644 index 00000000..0ef68338 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/tags/Functions.java @@ -0,0 +1,98 @@ +package mrbind_test.mr.tags; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_int()`. + */ + public static void foo_1_std_less_int() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_int.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_void()`. + */ + public static void foo_1_std_less_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_void.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_int()`. + */ + public static void foo_1_std_greater_int() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_int.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_void()`. + */ + public static void foo_1_std_greater_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_void.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_0()`. + */ + public static void foo_0() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java new file mode 100644 index 00000000..c7f7c440 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java @@ -0,0 +1,214 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Class templates. + * Generated from class `MR::TestSimpleTypes::ClassTemplate`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassTemplate_unsigned_long extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassTemplate_unsigned_long(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassTemplate_unsigned_long::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_ConstructFromAnother()`. + */ + public ClassTemplate_unsigned_long(mrbind_test.mr.testsimpletypes.ClassTemplate_unsigned_long _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_unsigned_long _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_unsigned_long()`. + */ + public ClassTemplate_unsigned_long(long _1) + { + this(__ctor_construct_unsigned_long(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_unsigned_long(long _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_unsigned_long.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_int()`. + */ + public ClassTemplate_unsigned_long(int _1) + { + this(__ctor_construct_int(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Construct_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::TestSimpleTypes::ClassTemplate::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_AssignFromAnother()`. + */ + public mrbind_test.mr.testsimpletypes.ClassTemplate_unsigned_long assignFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_unsigned_long _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsimpletypes.ClassTemplate_unsigned_long(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_unsigned_long()`. + */ + public void foo_unsigned_long() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_unsigned_long.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_int()`. + */ + public void foo_int() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_foo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_Get_var_unsigned_long()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Get_var_unsigned_long.invokeExact(); + return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_unsigned_long_Set_var_unsigned_long()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Set_var_unsigned_long.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long_Enum.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long_Enum.java new file mode 100644 index 00000000..3c1d94b0 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long_Enum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Enums. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class ClassTemplate_unsigned_long_Enum +{ + public final int value; + + public ClassTemplate_unsigned_long_Enum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static ClassTemplate_unsigned_long_Enum of(int value) + { + return new ClassTemplate_unsigned_long_Enum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof ClassTemplate_unsigned_long_Enum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "ClassTemplate_unsigned_long_Enum(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/E.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/E.java new file mode 100644 index 00000000..7029ea94 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/E2.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/E2.java new file mode 100644 index 00000000..9069a41b --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/E2.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has a custom underlying type. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final short value; + + public E2(short value) {this.value = value;} + + public static final E2 e1 = new E2((short)0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(short value) + { + if (value == e1.value) return e1; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return (int)value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/E3.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/E3.java new file mode 100644 index 00000000..f3991b6c --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/E3.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has no constants. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E3 +{ + public final int value; + + public E3(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E3 of(int value) + { + return new E3(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E3 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E3(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/E4.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/E4.java new file mode 100644 index 00000000..2a2f676e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/E4.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This has multiple words in the underlying type. This has caused a bug at one point... + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E4 +{ + public final int value; + + public E4(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E4 of(int value) + { + return new E4(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E4 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E4(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/E5.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/E5.java new file mode 100644 index 00000000..4525186f --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/E5.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This will use a custom typedef for the underlying type, if that's enabled! + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E5 +{ + public final long value; + + public E5(long value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E5 of(long value) + { + return new E5(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E5 o && o.value == value;} + @java.lang.Override public int hashCode() {return java.lang.Long.hashCode(value);} + @java.lang.Override public java.lang.String toString() + { + return "E5(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java new file mode 100644 index 00000000..c388fbfb --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -0,0 +1,928 @@ +package mrbind_test.mr.testsimpletypes; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSimpleTypes::GetInt`. + * + * Calls `MR_TestSimpleTypes_GetInt()`. + */ + public static int GetInt() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetInt`. + * + * Calls `MR_TestSimpleTypes_SetInt()`. + */ + public static void SetInt(int _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntDef`. + * + * Calls `MR_TestSimpleTypes_SetIntDef()`. + */ + public static void SetIntDef(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntPtr`. + * + * Calls `MR_TestSimpleTypes_GetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntPtr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtr`. + * + * Calls `MR_TestSimpleTypes_SetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntRef`. + * + * Calls `MR_TestSimpleTypes_GetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntRef.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRef`. + * + * Calls `MR_TestSimpleTypes_SetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRefDef`. + * + * Calls `MR_TestSimpleTypes_SetIntRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetConstVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtrPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtrPtr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum`. + * + * Calls `MR_TestSimpleTypes_GetEnum()`. + */ + public static int GetEnum() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum`. + * + * Calls `MR_TestSimpleTypes_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.testsimpletypes.E _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.testsimpletypes.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1.value))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_GetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumPtr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumRef`. + * + * Calls `MR_TestSimpleTypes_GetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumRef.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2`. + * + * Calls `MR_TestSimpleTypes_GetEnum2()`. + */ + public static int GetEnum2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2`. + * + * Calls `MR_TestSimpleTypes_SetEnum2()`. + */ + public static void SetEnum2(mrbind_test.mr.testsimpletypes.E2 _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Def`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Def()`. + */ + public static void SetEnum2Def(mrbind_test.mr.testsimpletypes.E2 _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Def.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, _1.value))); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ptr.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ref.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ref(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ref.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2RefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2RefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2RefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2RefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test all kinds of `char`. + * Generated from function `MR::TestSimpleTypes::CheckCharMaybeUnsigned`. + * + * Calls `MR_TestSimpleTypes_CheckCharMaybeUnsigned()`. Some types are raw C types, see the C bindings for the details. + */ + public static void CheckCharMaybeUnsigned(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckCharMaybeUnsigned.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_unsigned_char_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_unsigned_char_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_unsigned_char_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_signed_char_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_signed_char_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_signed_char_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::LongLong`. + * + * Calls `MR_TestSimpleTypes_LongLong()`. + */ + public static long LongLong(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_LongLong.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_unsigned_long()`. + */ + public static long blah_unsigned_long(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_unsigned_long.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_long()`. + */ + public static long blah_long(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_long.invokeExact(x); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_unsigned_long()`. + */ + public static long FuncTemplate(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_unsigned_long.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_int()`. + */ + public static int FuncTemplate(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsizet/A_unsigned_long.java b/test/output_java/src/mrbind_test/mr/testsizet/A_unsigned_long.java new file mode 100644 index 00000000..a60b6742 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsizet/A_unsigned_long.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.testsizet; + +/** + * Generated from class `MR::TestSizeT::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_unsigned_long extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_unsigned_long(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_unsigned_long::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_unsigned_long_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TestSizeT_A_unsigned_long_DefaultConstruct()`. + */ + public A_unsigned_long() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_unsigned_long_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TestSizeT::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSizeT_A_unsigned_long_ConstructFromAnother()`. + */ + public A_unsigned_long(mrbind_test.mr.testsizet.A_unsigned_long _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsizet.A_unsigned_long _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_unsigned_long_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSizeT_A_unsigned_long_AssignFromAnother()`. + */ + public mrbind_test.mr.testsizet.A_unsigned_long assignFromAnother(mrbind_test.mr.testsizet.A_unsigned_long _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_unsigned_long_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsizet.A_unsigned_long(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::foo`. + * + * Calls `MR_TestSizeT_A_unsigned_long_foo()`. + */ + public long foo() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_unsigned_long_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java/src/mrbind_test/mr/testsizet/Functions.java new file mode 100644 index 00000000..4975e507 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/testsizet/Functions.java @@ -0,0 +1,130 @@ +package mrbind_test.mr.testsizet; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_unsigned_long()`. + */ + public static long foo_unsigned_long(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_unsigned_long.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_unsigned_long_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_unsigned_long_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_unsigned_long_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_unsigned_long()`. + */ + public static mrbind_test.mr.cs.std_vector_unsigned_long foo(mrbind_test.mr.cs.std_vector_unsigned_long _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_unsigned_long.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_unsigned_long(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_long()`. + */ + public static long foo_long(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_long.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_long_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_long_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_long_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_long()`. + */ + public static mrbind_test.mr.cs.std_vector_long foo(mrbind_test.mr.cs.std_vector_long _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_long.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_vector_long(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/typedefsintemplates/A_int.java b/test/output_java/src/mrbind_test/mr/typedefsintemplates/A_int.java new file mode 100644 index 00000000..c1b41f84 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/typedefsintemplates/A_int.java @@ -0,0 +1,129 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * This tests a specific Clang bug/quirk. + * Certain typedefs in templates get their names printed without the template arguments of the enclosing class template, breaking our code generation. + * Generated from class `MR::TypedefsInTemplates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.typedefsintemplates.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.A_int assignFromAnother(mrbind_test.mr.typedefsintemplates.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::foo`. + * + * Calls `MR_TypedefsInTemplates_A_int_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int.java b/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int.java new file mode 100644 index 00000000..36c829bc --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int_DefaultConstruct()`. + */ + public B_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int_ConstructFromAnother()`. + */ + public B_int(mrbind_test.mr.typedefsintemplates.B_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java b/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java new file mode 100644 index 00000000..b14e376e --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java @@ -0,0 +1,150 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B::BB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int_BB_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int_BB_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int_BB_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct()`. + */ + public B_int_BB_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::BB::BB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother()`. + */ + public B_int_BB_float(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int_BB_float assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int_BB_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo`. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo2`. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_foo2()`. + */ + public int foo2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java new file mode 100644 index 00000000..05a81ad9 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.typedefsintemplates; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TypedefsInTemplates::bar`. + * + * Calls `MR_TypedefsInTemplates_bar()`. + */ + public static void bar(int _1) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/usingdecls/A.java b/test/output_java/src/mrbind_test/mr/usingdecls/A.java new file mode 100644 index 00000000..cf3ccce4 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.usingdecls; + +/** + * Test how `using` declarations import things. + * Generated from class `MR::UsingDecls::A`. + * Derived classes: + * Direct: (non-virtual) + * `MR::UsingDecls::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.usingdecls.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * + * Calls `MR_UsingDecls_A_Construct()`. + */ + public A(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from conversion operator `MR::UsingDecls::A::operator int`. + * + * Calls `MR_UsingDecls_A_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_A_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.A assignFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * + * Calls `MR_UsingDecls_A_assign()`. + */ + public void assign(int _1) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_assign.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::Method`. + * + * Calls `MR_UsingDecls_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::StaticFunc`. + * + * Calls `MR_UsingDecls_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * + * Calls `MR_UsingDecls_A_Get_StaticVar()`. + */ + public static int StaticVar() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * + * Calls `MR_UsingDecls_A_Set_StaticVar()`. + */ + public static void setStaticVar(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_UsingDecls_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `Field`. + * + * Calls `MR_UsingDecls_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/mr/usingdecls/A_E.java b/test/output_java/src/mrbind_test/mr/usingdecls/A_E.java new file mode 100644 index 00000000..73683b21 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/usingdecls/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.usingdecls; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java/src/mrbind_test/mr/usingdecls/B.java b/test/output_java/src/mrbind_test/mr/usingdecls/B.java new file mode 100644 index 00000000..8ad8d8a7 --- /dev/null +++ b/test/output_java/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,247 @@ +package mrbind_test.mr.usingdecls; + +/** + * Generated from class `MR::UsingDecls::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::UsingDecls::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.usingdecls.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::UsingDecls::B::operator int`. + * + * Calls `MR_UsingDecls_B_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_B_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::B::operator=`. + * + * Calls `MR_UsingDecls_B_assign()`. + */ + public void assign(int _1) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_assign.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::Method`. + * + * Calls `MR_UsingDecls_B_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::StaticFunc`. + * + * Calls `MR_UsingDecls_B_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::B` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_UsingDecls_B_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::B` named `Field`. + * + * Calls `MR_UsingDecls_B_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::B` named `StaticVar`. + * + * Calls `MR_UsingDecls_B_Get_StaticVar()`. + */ + public static int StaticVar() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_StaticVar.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::B` named `StaticVar`. + * + * Calls `MR_UsingDecls_B_Set_StaticVar()`. + */ + public static void setStaticVar(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_StaticVar.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float.java new file mode 100644 index 00000000..9c2ee743 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_DefaultConstruct()`. + */ + public phmap_btree_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float(mrbind_test.phmap.phmap_btree_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java new file mode 100644 index 00000000..1c8e1558 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java @@ -0,0 +1,247 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_btree_map_int_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java new file mode 100644 index 00000000..8bf8a2e2 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java @@ -0,0 +1,219 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float_iterator(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java new file mode 100644 index 00000000..4c1077dc --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java @@ -0,0 +1,433 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..9a901bf0 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java @@ -0,0 +1,247 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable()`. + */ + public phmap_btree_multimap_int_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java new file mode 100644 index 00000000..dd5553fa --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java @@ -0,0 +1,219 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int.java new file mode 100644 index 00000000..5068ce28 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int_DefaultConstruct()`. + */ + public phmap_btree_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int(mrbind_test.phmap.phmap_btree_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_multiset_int_ConstructFromRange()`. + */ + public phmap_btree_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_find()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_btree_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_end()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java new file mode 100644 index 00000000..a5e973ed --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int_const_iterator(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int.java new file mode 100644 index 00000000..da589d67 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int_DefaultConstruct()`. + */ + public phmap_btree_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int_ConstructFromAnother()`. + */ + public phmap_btree_set_int(mrbind_test.phmap.phmap_btree_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_set_int_ConstructFromRange()`. + */ + public phmap_btree_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_find()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_btree_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_end()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java new file mode 100644 index 00000000..361138b7 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java @@ -0,0 +1,170 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_set_int_const_iterator(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java new file mode 100644 index 00000000..37ec1c43 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..93e1be81 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java new file mode 100644 index 00000000..7d9268a6 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int.java b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int.java new file mode 100644 index 00000000..88733495 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int_ConstructFromRange()`. + */ + public phmap_flat_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_flat_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_flat_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java new file mode 100644 index 00000000..0687c782 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int_const_iterator(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java new file mode 100644 index 00000000..7d56c333 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..f21f8e62 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java new file mode 100644 index 00000000..58dfc6f1 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int.java b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int.java new file mode 100644 index 00000000..42bf494d --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int_DefaultConstruct()`. + */ + public phmap_node_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int(mrbind_test.phmap.phmap_node_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_node_hash_set_int_ConstructFromRange()`. + */ + public phmap_node_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_node_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_node_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java new file mode 100644 index 00000000..808ec2ae --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int_const_iterator(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java new file mode 100644 index 00000000..f866f2b6 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..6c596b4a --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java new file mode 100644 index 00000000..664cf73c --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java new file mode 100644 index 00000000..6f63683d --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange()`. + */ + public phmap_parallel_flat_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java new file mode 100644 index 00000000..05ab6320 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java new file mode 100644 index 00000000..73d88f2b --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java @@ -0,0 +1,457 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..88870437 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java @@ -0,0 +1,225 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java new file mode 100644 index 00000000..0cba694d --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java @@ -0,0 +1,197 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java new file mode 100644 index 00000000..51cf7522 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java @@ -0,0 +1,381 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange()`. + */ + public phmap_parallel_node_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java new file mode 100644 index 00000000..899e48e0 --- /dev/null +++ b/test/output_java/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java @@ -0,0 +1,148 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java new file mode 100644 index 00000000..5969c872 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java @@ -0,0 +1,9 @@ +package mrbind_test; + +/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +public class CppException extends RuntimeException +{ + private static final long serialVersionUID = 1; + + public CppException(String message) {super(message);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java new file mode 100644 index 00000000..2909e68e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java @@ -0,0 +1,90 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * + * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), + * or is a reference to an object owned by something else. References returned by methods keep their owner alive. + */ +public abstract class CppObject implements Native, AutoCloseable +{ + // Runs the destructor from the cleaner. Must not reference the wrapper, or it would never be collected. + private static final class State implements Runnable + { + final java.lang.foreign.MemorySegment ptr; + final java.util.function.Consumer destroy; + volatile boolean owned = true; + + State(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy) + { + this.ptr = ptr; + this.destroy = destroy; + } + + @Override public void run() + { + if (owned) + { + owned = false; + destroy.accept(ptr); + } + } + } + + private final java.lang.foreign.MemorySegment ptr; + private final State state; // Null if not owned. + private final java.lang.ref.Cleaner.Cleanable cleanable; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + private boolean closed; + + /** + * Wraps a pointer from the C bindings. If `destroy` is not null, the object is owned and `destroy` is called on it when the wrapper dies. + * `owner` is kept alive as long as this wrapper is. + */ + @SuppressWarnings("this-escape") + protected CppObject(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy, Object owner) + { + if (ptr.address() == 0) + throw new NullPointerException("The C bindings returned a null pointer."); + this.ptr = ptr; + this.owner = owner; + if (destroy != null) + { + state = new State(ptr, destroy); + cleanable = Ffi.CLEANER.register(this, state); + } + else + { + state = null; + cleanable = null; + } + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() + { + if (closed) + throw new IllegalStateException("This object was closed or moved from."); + return ptr; + } + + /** Does this wrapper own its C++ object? */ + public final boolean isOwned() {return state != null && state.owned;} + + /** Destroys the C++ object now, if owned. The wrapper can't be used after this. Calling it again does nothing. */ + @Override public final void close() + { + closed = true; + if (cleanable != null) + cleanable.clean(); + } + + /** Gives up the ownership of the C++ object and returns its pointer. The caller is responsible for destroying it. The wrapper can't be used after this. */ + public final java.lang.foreign.MemorySegment release() + { + if (!isOwned()) + throw new IllegalStateException("This object is not owned by the wrapper, it can't be moved from."); + state.owned = false; + closed = true; + return ptr; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java new file mode 100644 index 00000000..16a3e7c1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java @@ -0,0 +1,22 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * + * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), + * those returned by reference from the bindings point into memory owned by something else, which they keep alive. + */ +public abstract class CppStruct implements Native +{ + protected final java.lang.foreign.MemorySegment segment; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + + /** Wraps a segment of the exact struct size. `owner` is kept alive as long as this wrapper is. */ + protected CppStruct(java.lang.foreign.MemorySegment segment, Object owner) + { + this.segment = segment; + this.owner = owner; + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() {return segment;} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java new file mode 100644 index 00000000..e4751704 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java @@ -0,0 +1,214 @@ +package mrbind_test; + +/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +@SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. +public final class Ffi +{ + private Ffi() {} + + public static final java.lang.foreign.Linker LINKER = java.lang.foreign.Linker.nativeLinker(); + public static final java.lang.ref.Cleaner CLEANER = java.lang.ref.Cleaner.create(); + public static final boolean IS_WINDOWS = System.getProperty("os.name", "").toLowerCase(java.util.Locale.ROOT).startsWith("windows"); + + /** The layout of C `long`: 4 bytes on Windows, 8 bytes elsewhere. The name lets `downcall()` widen it to a Java `long`. */ + public static final java.lang.foreign.ValueLayout C_LONG = (IS_WINDOWS ? java.lang.foreign.ValueLayout.JAVA_INT : java.lang.foreign.ValueLayout.JAVA_LONG).withName("mrbind_c_long"); + + /** How an object is passed to a C function. Matches the C enum `MR_C_PassBy`. */ + public static final int PASS_BY_DEFAULT_CONSTRUCT = 0; + public static final int PASS_BY_COPY = 1; + public static final int PASS_BY_MOVE = 2; + public static final int PASS_BY_MOVE_AND_DESTROY = 3; + public static final int PASS_BY_DEFAULT_ARGUMENT = 4; + public static final int PASS_BY_NO_OBJECT = 5; + + // The library of each file group of the C bindings, see `--split-library` in the C generator. + private static final java.util.Map LIB_NAMES = java.util.Map.of("", "bleh", "MR_AB_", "bleh_AB", "MR_A_", "bleh_A", "MR_B_", "bleh_B"); + private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); + + /** + * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, + * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + */ + public static synchronized java.lang.foreign.SymbolLookup lookup(String group) + { + java.lang.foreign.SymbolLookup ret = LOOKUPS.get(group); + if (ret == null) + { + String lib = LIB_NAMES.get(group); + if (lib == null) + throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } + } + LOOKUPS.put(group, ret); + } + return ret; + } + + /** + * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. + * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. + */ + public static java.lang.invoke.MethodHandle downcall(String group, String name, java.lang.foreign.FunctionDescriptor desc) + { + java.util.Optional symbol = lookup(group).find(name); + java.lang.invoke.MethodHandle handle; + if (symbol.isPresent()) + { + handle = LINKER.downcallHandle(symbol.get(), desc); + } + else + { + java.lang.invoke.MethodType type = desc.toMethodType(); + if (desc.returnLayout().isPresent() && desc.returnLayout().get() instanceof java.lang.foreign.GroupLayout) + type = type.insertParameterTypes(0, java.lang.foreign.SegmentAllocator.class); // Struct returns take an allocator first. + UnsatisfiedLinkError error = new UnsatisfiedLinkError("The function `" + name + "` is missing from the library `" + LIB_NAMES.get(group) + "`."); + handle = java.lang.invoke.MethodHandles.throwException(type.returnType(), UnsatisfiedLinkError.class).bindTo(error); + handle = java.lang.invoke.MethodHandles.dropArguments(handle, 0, type.parameterList()); + } + java.lang.invoke.MethodType type = handle.type(); + boolean changed = false; + if (desc.returnLayout().isPresent() && isCLong(desc.returnLayout().get()) && type.returnType() == int.class) + { + type = type.changeReturnType(long.class); + changed = true; + } + java.util.List args = desc.argumentLayouts(); + int offset = type.parameterCount() - args.size(); // 1 if a `SegmentAllocator` was prepended for a struct return. + for (int i = 0; i < args.size(); i++) + { + if (isCLong(args.get(i)) && type.parameterType(i + offset) == int.class) + { + type = type.changeParameterType(i + offset, long.class); + changed = true; + } + } + if (changed) + handle = java.lang.invoke.MethodHandles.explicitCastArguments(handle, type); + return handle; + } + + private static boolean isCLong(java.lang.foreign.MemoryLayout layout) + { + return layout.name().isPresent() && layout.name().get().equals("mrbind_c_long"); + } + + public static long getCLong(java.lang.foreign.MemorySegment segment, long offset) + { + return IS_WINDOWS ? segment.get(java.lang.foreign.ValueLayout.JAVA_INT, offset) : segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, offset); + } + + public static void setCLong(java.lang.foreign.MemorySegment segment, long offset, long value) + { + if (IS_WINDOWS) + segment.set(java.lang.foreign.ValueLayout.JAVA_INT, offset, (int)value); + else + segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, offset, value); + } + + /** The pointer of a wrapper, or `NULL` for a null wrapper. */ + public static java.lang.foreign.MemorySegment ptr(Native object) + { + return object == null ? java.lang.foreign.MemorySegment.NULL : object.rawPointer(); + } + + /** The pointer of a wrapper. Throws if the wrapper is null. */ + public static java.lang.foreign.MemorySegment ptrNonNull(Native object, String name) + { + if (object == null) + throw new NullPointerException("The parameter `" + name + "` must not be null."); + return object.rawPointer(); + } + + // Allocates a single value, for the parameters passed by pointer. + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfBoolean layout, boolean value) {return allocator.allocate(layout).fill((byte)(value ? 1 : 0));} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfByte layout, byte value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfShort layout, short value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfInt layout, int value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfLong layout, long value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfFloat layout, float value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfDouble layout, double value) {return allocator.allocateFrom(layout, value);} + + /** Allocates the UTF-8 bytes of a string, without a null terminator. Returns `NULL` for null. */ + public static java.lang.foreign.MemorySegment utf8(java.lang.foreign.SegmentAllocator allocator, String str) + { + if (str == null) + return java.lang.foreign.MemorySegment.NULL; + byte[] bytes = str.getBytes(java.nio.charset.StandardCharsets.UTF_8); + return allocator.allocateFrom(java.lang.foreign.ValueLayout.JAVA_BYTE, bytes); + } + + /** The end pointer of a segment allocated by `utf8()`. `NULL` for `NULL`. */ + public static java.lang.foreign.MemorySegment end(java.lang.foreign.MemorySegment segment) + { + return segment.address() == 0 ? java.lang.foreign.MemorySegment.NULL : segment.asSlice(segment.byteSize()); + } + + /** Decodes a UTF-8 string from `size` bytes at `data`. */ + public static String string(java.lang.foreign.MemorySegment data, long size) + { + if (size == 0) + return ""; + return new String(data.reinterpret(size).toArray(java.lang.foreign.ValueLayout.JAVA_BYTE), java.nio.charset.StandardCharsets.UTF_8); + } + + /** Builds a struct layout with the C alignment rules: each field is aligned naturally, and the struct is padded to its alignment. */ + public static java.lang.foreign.StructLayout structLayout(String[] names, java.lang.foreign.MemoryLayout[] fields) + { + java.util.List elems = new java.util.ArrayList<>(); + long offset = 0, align = 1; + for (int i = 0; i < fields.length; i++) + { + long a = fields[i].byteAlignment(); + long pad = (a - offset % a) % a; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + elems.add(fields[i].withName(names[i])); + offset += pad + fields[i].byteSize(); + align = Math.max(align, a); + } + long pad = (align - offset % align) % align; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + if (elems.isEmpty()) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(1)); // Empty C++ structs have the size 1. + return java.lang.foreign.MemoryLayout.structLayout(elems.toArray(new java.lang.foreign.MemoryLayout[0])); + } + + /** Checks a struct layout against the size and alignment the C bindings were generated with. */ + public static void checkLayout(java.lang.foreign.StructLayout layout, long size, long alignment, String name) + { + if (layout.byteSize() != size || layout.byteAlignment() != alignment) + throw new IllegalStateException("The Java layout of `" + name + "` (" + layout.byteSize() + " bytes, aligned to " + layout.byteAlignment() + ") doesn't match C++ (" + size + " bytes, aligned to " + alignment + ")."); + } + + /** Allocates zeroed memory for a struct. It's freed when the segment becomes unreachable. */ + public static java.lang.foreign.MemorySegment allocStruct(java.lang.foreign.MemoryLayout layout) + { + return java.lang.foreign.Arena.ofAuto().allocate(layout); + } + + /** Converts a `Throwable` from `invokeExact()` to something that can be thrown from a method without a `throws` clause. */ + public static RuntimeException rethrow(Throwable e) + { + if (e instanceof RuntimeException r) + return r; + if (e instanceof Error err) + throw err; + return new RuntimeException(e); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Native.java b/test/output_java_fixed_typedefs/src/mrbind_test/Native.java new file mode 100644 index 00000000..f9d8474e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Native.java @@ -0,0 +1,8 @@ +package mrbind_test; + +/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +public interface Native +{ + /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ + java.lang.foreign.MemorySegment rawPointer(); +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java new file mode 100644 index 00000000..a8beb2d3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +public final class a +{ + private a() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecA = mrbind_test.Ffi.downcall("MR_A_", "MR_GetSeparateVecA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..f8a4e425 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateA +{ + private std_vector_MR_SeparateA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("MR_A_", "MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("MR_A_", "MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("MR_A_", "MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("MR_A_", "MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_DefaultConstruct = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_size = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_empty = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_resize_with_default_value = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_clear = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_capacity = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_reserve = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_shrink_to_fit = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_push_back = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_pop_back = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_iter = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_iter = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index_mut = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_deref = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_incr = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_decr = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_deref = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_incr = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_decr = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_add_assign = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_Destroy = mrbind_test.Ffi.downcall("MR_A_", "MR_C_std_vector_MR_SeparateA_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..12044402 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.AB; + +/** The downcall handles of the C bindings file `AB/std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_pair_MR_SeparateA_MR_SeparateB +{ + private std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..e4a13562 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.AB; + +/** The downcall handles of the C bindings file `AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB +{ + private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java new file mode 100644 index 00000000..053d5b1a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.AB_base; + +/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +public final class ab_base +{ + private ab_base() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_mark_shared_common_base_ab = mrbind_test.Ffi.downcall("", "MR_mark_shared_common_base_ab", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java new file mode 100644 index 00000000..7ff27b6b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +public final class b +{ + private b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecB = mrbind_test.Ffi.downcall("MR_B_", "MR_GetSeparateVecB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..6693dc72 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateB +{ + private std_vector_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_B_", "MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_B_", "MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_B_", "MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_B_", "MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_size = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_empty = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_clear = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("MR_B_", "MR_C_std_vector_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java new file mode 100644 index 00000000..0b883a82 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +public final class _1 +{ + private _1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_foo = mrbind_test.Ffi.downcall("", "MR_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_bar = mrbind_test.Ffi.downcall("", "MR_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Get_x = mrbind_test.Ffi.downcall("", "MR_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Set_x = mrbind_test.Ffi.downcall("", "MR_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java new file mode 100644 index 00000000..a38f5279 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +public final class test_abstract_classes +{ + private test_abstract_classes() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_A_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java new file mode 100644 index 00000000..ae649f6b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +public final class test_adjusting_names +{ + private test_adjusting_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConvertTo_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConvertTo_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Get_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Get_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_GetMutable_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_GetMutable_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Set_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Set_var_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Destroy = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java new file mode 100644 index 00000000..e77aead6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java @@ -0,0 +1,125 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +public final class test_aggregates +{ + private test_aggregates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_y", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_j", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java new file mode 100644 index 00000000..e61dea09 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types +{ + private test_arrays_of_incomplete_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_foo = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java new file mode 100644 index 00000000..c992d055 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types_2 +{ + private test_arrays_of_incomplete_types_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_bar = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java new file mode 100644 index 00000000..6d464b87 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +public final class test_bases +{ + private test_bases() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Bases_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D3_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D3_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java new file mode 100644 index 00000000..9e52d501 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +public final class test_combined_a_b +{ + private test_combined_a_b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetCombinedVecAB = mrbind_test.Ffi.downcall("", "MR_GetCombinedVecAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java new file mode 100644 index 00000000..ede36e45 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +public final class test_conv_ops +{ + private test_conv_ops() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConvertTo_bool = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConvertTo_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java new file mode 100644 index 00000000..18e54c28 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,93 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +public final class test_copy_inherited_members +{ + private test_copy_inherited_members() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConvertTo_int32_t = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConvertTo_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConvertTo_int32_t = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConvertTo_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java new file mode 100644 index 00000000..ad2c2367 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1304 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +public final class test_csharp +{ + private test_csharp() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_bool_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_print_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_print_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_str = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_str", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_keyword_in_param_name = mrbind_test.Ffi.downcall("", "MR_CSharp_test_keyword_in_param_name", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_se_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_se_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_sg_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_sg_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsA_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsA_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsB_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsB_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsC_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsC_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsD_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsD_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsE_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsE_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsF_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsF_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsG_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsG_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsH_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsH_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsA = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsB = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsB", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsC = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsD = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsE = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsF = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsG = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_StaticOpsRhsH = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_StaticOpsRhsH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsEnum_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsEnum_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_float = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_add_float_MR_CSharp_NonTrivialClassOps = mrbind_test.Ffi.downcall("", "MR_C_add_float_MR_CSharp_NonTrivialClassOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int32_t_MR_CSharp_NonCopyableClassByValueOps = mrbind_test.Ffi.downcall("", "MR_C_add_int32_t_MR_CSharp_NonCopyableClassByValueOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int32_t_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_sub_int32_t_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int32_t_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_div_int32_t_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int32_t_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_mod_int32_t_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_vec = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_vec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_asave_ref_in_exposed_layout = mrbind_test.Ffi.downcall("", "MR_CSharp_asave_ref_in_exposed_layout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int32_t_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_sub_int32_t_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int32_t_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_div_int32_t_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int32_t_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_mod_int32_t_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_make_exposed_sh = mrbind_test.Ffi.downcall("", "MR_CSharp_make_exposed_sh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_with_repeated_types = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_with_repeated_types", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H1 + { + private H1() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflicts", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflictsExposed = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflictsExposed", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_end_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_mut_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_mut_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_const_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_const_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple0 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple1 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_pair2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_pair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_const = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_const", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_crefs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_crefs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_value = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_lvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_lvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_A_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ci = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ci", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cs = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_0", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_3 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H2 + { + private H2() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int32_t = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int32_t = mrbind_test.Ffi.downcall("", "MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_int16_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_int16_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorExposed_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorExposed_Construct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ConvCtorExposed.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_int32_t = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_float_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_uint16_t_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_uint16_t_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA_int32_t = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityA_int32_t = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityA_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB_int32_t = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityB_int32_t = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityB_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC_int32_t = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityC_int32_t = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityC_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityD_const_int32_t_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityD_const_int32_t_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayout_ref_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayout_ref_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayout_int32_t = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayout_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_const_MR_CSharp_ExposedLayout_ref_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_const_MR_CSharp_ExposedLayout_ref_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayout_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayout_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_2", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayoutSh_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayoutSh_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayoutSh_int32_t = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayoutSh_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H3 + { + private H3() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref_static = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref_static", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_this_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_this_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_name_Conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_name_Conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_name_conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflictsExposed_name_Conflicts_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflictsExposed_name_Conflicts_exposed", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_int32_t = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConvertTo_std_string = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConvertTo_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConvertTo_std_string_view = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConvertTo_std_string_view", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo_mut", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_sub_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mul_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_div_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mod_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_xor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitand_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_lshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_rshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow_star", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_index", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f4", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f5", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f6", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f7", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java new file mode 100644 index 00000000..46bfd0e7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +public final class test_custom_preferred_names +{ + private test_custom_preferred_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_blah = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java new file mode 100644 index 00000000..2d1c9ac2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +public final class test_declaration_order +{ + private test_declaration_order() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_c = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_c", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A_B.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_d = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_a = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_a", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_b = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_false_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_false_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_true.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_true_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_true_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_false.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java new file mode 100644 index 00000000..d7791105 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java @@ -0,0 +1,15 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +public final class test_deprecation +{ + private test_deprecation() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Deprecation_foo = mrbind_test.Ffi.downcall("", "MR_Deprecation_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Deprecation_bar = mrbind_test.Ffi.downcall("", "MR_Deprecation_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java new file mode 100644 index 00000000..6d1a532d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants +{ + private test_includes_for_enum_constants() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_foo = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java new file mode 100644 index 00000000..6d263071 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_2 +{ + private test_includes_for_enum_constants_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java new file mode 100644 index 00000000..4dc1659c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_3 +{ + private test_includes_for_enum_constants_3() {} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java new file mode 100644 index 00000000..14b90d68 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +public final class test_iostream +{ + private test_iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_print_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_print_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_input_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_input_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IOStream_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_Destroy = mrbind_test.Ffi.downcall("", "MR_IOStream_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java new file mode 100644 index 00000000..72709289 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -0,0 +1,39 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +public final class test_lifetime_inference +{ + private test_lifetime_inference() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_begin = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_end = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Construct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java new file mode 100644 index 00000000..e9fb1312 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +public final class test_matching_layout +{ + private test_matching_layout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_foo = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_foo", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bar = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_baz = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bleh = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bleh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java new file mode 100644 index 00000000..480d22f7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +public final class test_member_vars +{ + private test_member_vars() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_z", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_w = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_w", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_y = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_ref = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Destroy = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java new file mode 100644 index 00000000..d101f32e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -0,0 +1,34 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +public final class test_mention_blacklists +{ + private test_mention_blacklists() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Get_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Set_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java new file mode 100644 index 00000000..a98ac37d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +public final class test_nested_class_template_inst +{ + private test_nested_class_template_inst() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_AA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_AA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_AA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_AA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_AA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_AA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int32_t_AA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int32_t_AA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java new file mode 100644 index 00000000..151f301e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java @@ -0,0 +1,28 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +public final class test_nested_types +{ + private test_nested_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java new file mode 100644 index 00000000..8f399e92 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +public final class test_omitting_template_args_and_quals +{ + private test_omitting_template_args_and_quals() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int32_t = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_b = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OmittingTargsAndQuals_A_int32_t = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OmittingTargsAndQuals_A_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OmittingTargsAndQuals_A_int32_t = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OmittingTargsAndQuals_A_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_c = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_d = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_inst = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_inst", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_int32_t = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OmittingTargsAndQuals_A_int32_t_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OmittingTargsAndQuals_A_int32_t_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java new file mode 100644 index 00000000..5a68a556 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -0,0 +1,117 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +public final class test_overloaded_operators +{ + private test_overloaded_operators() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_arrow_star_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_arrow_star_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_add_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_sub_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mul_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_div_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mod_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_xor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitand_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_lshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_rshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow_star = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_call = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_index = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java new file mode 100644 index 00000000..9ccccfc2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +public final class test_overloads +{ + private test_overloads() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Overloads_a_1 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_a_2 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_int32_t = mrbind_test.Ffi.downcall("", "MR_Overloads_b_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_float = mrbind_test.Ffi.downcall("", "MR_Overloads_b_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_int32_t = mrbind_test.Ffi.downcall("", "MR_Overloads_c_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_float = mrbind_test.Ffi.downcall("", "MR_Overloads_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_int32_t = mrbind_test.Ffi.downcall("", "MR_Overloads_d_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_float = mrbind_test.Ffi.downcall("", "MR_Overloads_d_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_const_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_e_const_int32_t_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int32_t_rvalue_ref_int32_t = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int32_t_rvalue_ref_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int32_t_rvalue_ref_float = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int32_t_rvalue_ref_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_float = mrbind_test.Ffi.downcall("", "MR_Overloads_f_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_int32_t_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_int32_t_rvalue_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_const_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_const_int32_t_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java new file mode 100644 index 00000000..ac1cdc90 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +public final class test_phmap +{ + private test_phmap() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_set_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_set_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_map_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_map_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_set_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_set_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_map_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_map_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_set_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_set_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_map_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_map_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_set_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_set_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_map_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_map_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_set_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_set_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_map_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_map_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multiset_int32_t = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multiset_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multimap_int32_t_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multimap_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java new file mode 100644 index 00000000..88ff3f57 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java @@ -0,0 +1,72 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +public final class test_simple_types +{ + private test_simple_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetConstVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_SHORT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Def = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2RefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2RefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckCharMaybeUnsigned = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckCharMaybeUnsigned", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_uint8_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_uint8_t_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_int8_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_int8_t_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_int32_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int32_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int32_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_GetMutable_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_GetMutable_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java new file mode 100644 index 00000000..5d44359e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +public final class test_size_t_ptrdiff_t +{ + private test_size_t_ptrdiff_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_uint64_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_uint64_t_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_int64_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_int64_t_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_foo = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java new file mode 100644 index 00000000..f1670f9a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +public final class test_static_memberr +{ + private test_static_memberr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_blah = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java new file mode 100644 index 00000000..2aa6191c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java @@ -0,0 +1,65 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +public final class test_std_containers +{ + private test_std_containers() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdContainers_Set = mrbind_test.Ffi.downcall("", "MR_StdContainers_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdContainers_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_Get = mrbind_test.Ffi.downcall("", "MR_StdContainers_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDeque = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDeque", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetList = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetList", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArray", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArraySimple = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArraySimple", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int32_t_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimpleParam = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimpleParam", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.cs.std_array_int32_t_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimplePtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimplePtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetWithMergedIters = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetWithMergedIters", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIter = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIterConst = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIterConst", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefCon = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefCon", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetVectorNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetVectorNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDequeNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDequeNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetListNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetListNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayOfPlainArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayOfPlainArray", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int32_t_array_4_array_3_5.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_less_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Construct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java new file mode 100644 index 00000000..91102810 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +public final class test_std_expected +{ + private test_std_expected() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExp", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVoid", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoid", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVec = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java new file mode 100644 index 00000000..a1136b31 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +public final class test_std_filesystem +{ + private test_std_filesystem() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_GetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_GetPath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPath", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathConstRef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java new file mode 100644 index 00000000..798efe87 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +public final class test_std_function +{ + private test_std_function() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int32_t_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int32_t_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_int32_t_int32_t = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_int32_t_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int32_t_func_from_int32_t_int32_t = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int32_t_func_from_int32_t_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int32_t_MR_StdFunction_E = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int32_t_MR_StdFunction_E", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_std_string_func_from_int32_t_float = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_std_string_func_from_int32_t_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_std_string = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_A_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_A_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Get_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Set_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java new file mode 100644 index 00000000..7350f68b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java @@ -0,0 +1,49 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +public final class test_std_optional +{ + private test_std_optional() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2ConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2Def = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Get_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Set_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java new file mode 100644 index 00000000..1f445355 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -0,0 +1,57 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_shared_ptr +{ + private test_std_shared_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java new file mode 100644 index 00000000..f18d09b9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +public final class test_std_string +{ + private test_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdString_Set = mrbind_test.Ffi.downcall("", "MR_StdString_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdString_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_Get = mrbind_test.Ffi.downcall("", "MR_StdString_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java new file mode 100644 index 00000000..6f7e95cb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +public final class test_std_string_view +{ + private test_std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdStringView_Set = mrbind_test.Ffi.downcall("", "MR_StdStringView_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdStringView_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_Get = mrbind_test.Ffi.downcall("", "MR_StdStringView_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java new file mode 100644 index 00000000..37f0e2c3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +public final class test_std_tuple_like +{ + private test_std_tuple_like() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetPair", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair3 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair4 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair5 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair6 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetTuple", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple7 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple8 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple8", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java new file mode 100644 index 00000000..582bbab5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_unique_ptr +{ + private test_std_unique_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetFloat", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloat", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloatDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloatDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java new file mode 100644 index 00000000..cb08b206 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +public final class test_tags +{ + private test_tags() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_int32_t = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_int32_t = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_0 = mrbind_test.Ffi.downcall("", "MR_Tags_foo_0", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java new file mode 100644 index 00000000..5671e0f9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +public final class test_typedefs_in_templates +{ + private test_typedefs_in_templates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_bar = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int32_t_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int32_t_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_foo2 = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_foo2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int32_t_BB_float_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int32_t_BB_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java new file mode 100644 index 00000000..6fcba0d6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +public final class test_using_decls +{ + private test_using_decls() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Construct = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConvertTo_int32_t = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConvertTo_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_assign = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Method = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java new file mode 100644 index 00000000..3c3aae29 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +public final class test_variant +{ + private test_variant() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdVariant_foo = mrbind_test.Ffi.downcall("", "MR_StdVariant_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_bar = mrbind_test.Ffi.downcall("", "MR_StdVariant_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_baz = mrbind_test.Ffi.downcall("", "MR_StdVariant_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_blah = mrbind_test.Ffi.downcall("", "MR_StdVariant_blah", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..eb92dadc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_E1_float +{ + private expected_MR_CSharp_E1_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_E1_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_E1_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..4075a946 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_ExposedLayoutSh_float +{ + private expected_MR_CSharp_ExposedLayoutSh_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayoutSh_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayoutSh_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..e4f11715 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_ExposedLayout_float +{ + private expected_MR_CSharp_ExposedLayout_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_ExposedLayout_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_ExposedLayout_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..eb6eae2b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_NonTrivial_float +{ + private expected_MR_CSharp_NonTrivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_NonTrivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_NonTrivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..517c6c03 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_SA_float +{ + private expected_MR_CSharp_SA_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_SA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_SA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..1adcadc0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +public final class expected_MR_CSharp_Trivial_float +{ + private expected_MR_CSharp_Trivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_MR_CSharp_Trivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_MR_CSharp_Trivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java new file mode 100644 index 00000000..b41c8320 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_int32_t_float`. Generated by mrbind, do not edit. */ +public final class expected_int32_t_float +{ + private expected_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java new file mode 100644 index 00000000..8190d2b0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_int32_t_std_string`. Generated by mrbind, do not edit. */ +public final class expected_int32_t_std_string +{ + private expected_int32_t_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_success = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_error = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_int32_t_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_int32_t_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java new file mode 100644 index 00000000..701d8c06 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `expected_void_float`. Generated by mrbind, do not edit. */ +public final class expected_void_float +{ + private expected_void_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_success = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_value = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_error = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_expected_void_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_expected_void_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java new file mode 100644 index 00000000..1af4cd30 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +public final class iostream +{ + private iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_GetStdCout = mrbind_test.Ffi.downcall("", "MR_C_GetStdCout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCerr = mrbind_test.Ffi.downcall("", "MR_C_GetStdCerr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdClog = mrbind_test.Ffi.downcall("", "MR_C_GetStdClog", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCin = mrbind_test.Ffi.downcall("", "MR_C_GetStdCin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java new file mode 100644 index 00000000..9e25fd89 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_map_int32_t_float +{ + private phmap_btree_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java new file mode 100644 index 00000000..71d53f9e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multimap_int32_t_float +{ + private phmap_btree_multimap_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java new file mode 100644 index 00000000..3758f22d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multiset_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multiset_int32_t +{ + private phmap_btree_multiset_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multiset_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multiset_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java new file mode 100644 index 00000000..a8261fd9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_set_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_btree_set_int32_t +{ + private phmap_btree_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java new file mode 100644 index 00000000..41907ea6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_map_int32_t_float +{ + private phmap_flat_hash_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java new file mode 100644 index 00000000..39bd3381 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_set_int32_t +{ + private phmap_flat_hash_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java new file mode 100644 index 00000000..525e6587 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_map_int32_t_float +{ + private phmap_node_hash_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java new file mode 100644 index 00000000..e7a36fca --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_set_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_set_int32_t +{ + private phmap_node_hash_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java new file mode 100644 index 00000000..141c81f3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_map_int32_t_float +{ + private phmap_parallel_flat_hash_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java new file mode 100644 index 00000000..4bca94b5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_set_int32_t +{ + private phmap_parallel_flat_hash_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java new file mode 100644 index 00000000..ee541326 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_map_int32_t_float +{ + private phmap_parallel_node_hash_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java new file mode 100644 index 00000000..9fec1a18 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int32_t`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_set_int32_t +{ + private phmap_parallel_node_hash_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..5cc3ac9a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_A_42 +{ + private std_array_MR_StdContainers_A_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..db4ef900 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,23 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_NonAssignable_42 +{ + private std_array_MR_StdContainers_NonAssignable_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java new file mode 100644 index 00000000..102fa0e4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int32_t_43`. Generated by mrbind, do not edit. */ +public final class std_array_int32_t_43 +{ + private std_array_int32_t_43() {} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java new file mode 100644 index 00000000..cab96b32 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int32_t_array_4_array_3_5`. Generated by mrbind, do not edit. */ +public final class std_array_int32_t_array_4_array_3_5 +{ + private std_array_int32_t_array_4_array_3_5() {} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..5311eb69 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,62 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_deque_MR_StdContainers_NonAssignable +{ + private std_deque_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java new file mode 100644 index 00000000..d63f749d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java @@ -0,0 +1,71 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_int32_t`. Generated by mrbind, do not edit. */ +public final class std_deque_int32_t +{ + private std_deque_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int32_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int32_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int32_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int32_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int32_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int32_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java new file mode 100644 index 00000000..8c29e384 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +public final class std_filesystem_path +{ + private std_filesystem_path() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_string = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..bba6c24a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 +{ + private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..0ff77b94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC +{ + private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..e64172e5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_A +{ + private std_function_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java new file mode 100644 index 00000000..320c5965 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E +{ + private std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java new file mode 100644 index 00000000..77249d27 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t`. Generated by mrbind, do not edit. */ +public final class std_function_int32_t +{ + private std_function_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java new file mode 100644 index 00000000..e6764bfd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +public final class std_function_int32_t_from_int32_t_int32_t +{ + private std_function_int32_t_from_int32_t_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java new file mode 100644 index 00000000..e9fdb82f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_int32_t_from_std_string +{ + private std_function_int32_t_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java new file mode 100644 index 00000000..a6a069b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref +{ + private std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java new file mode 100644 index 00000000..a6727072 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int32_t_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int32_t_rvalue_ref +{ + private std_function_int32_t_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java new file mode 100644 index 00000000..ec6344ec --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int32_t_float +{ + private std_function_std_string_from_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java new file mode 100644 index 00000000..2333c5e9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int32_t_int32_t +{ + private std_function_std_string_from_int32_t_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java new file mode 100644 index 00000000..ebfa3a4f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +public final class std_function_void +{ + private std_function_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..2e84d3df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_MR_StdFunction_A +{ + private std_function_void_from_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java new file mode 100644 index 00000000..8f5817ec --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_int32_t_int32_t +{ + private std_function_void_from_int32_t_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java new file mode 100644 index 00000000..f461d793 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_std_string +{ + private std_function_void_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..68c6eaea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,59 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_list_MR_StdContainers_NonAssignable +{ + private std_list_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java new file mode 100644 index 00000000..4f306800 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_int32_t`. Generated by mrbind, do not edit. */ +public final class std_list_int32_t +{ + private std_list_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int32_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int32_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int32_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int32_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..5621fc6f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_map_MR_StdContainers_NonAssignable_float +{ + private std_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java new file mode 100644 index 00000000..32638f65 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_map_int32_t_float +{ + private std_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..722ad6f8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_MR_StdContainers_NonAssignable_float +{ + private std_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java new file mode 100644 index 00000000..47819c3a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_int32_t_float +{ + private std_multimap_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..1a02113a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_multiset_MR_StdContainers_NonAssignable +{ + private std_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java new file mode 100644 index 00000000..386a415d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +public final class std_multiset_float +{ + private std_multiset_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java new file mode 100644 index 00000000..636a921b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_int32_t`. Generated by mrbind, do not edit. */ +public final class std_multiset_int32_t +{ + private std_multiset_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..2e391f50 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_ExposedLayoutSh +{ + private std_optional_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..10bee38b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_NonTrivial +{ + private std_optional_MR_CSharp_NonTrivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..13ff2ba8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_SA +{ + private std_optional_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..cde44112 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_Trivial +{ + private std_optional_MR_CSharp_Trivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..41f59d25 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_A +{ + private std_optional_MR_StdOptional_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..f091760c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_B +{ + private std_optional_MR_StdOptional_B() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..26c2b8ea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_E +{ + private std_optional_MR_StdOptional_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java new file mode 100644 index 00000000..6d79b24e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_int32_t`. Generated by mrbind, do not edit. */ +public final class std_optional_int32_t +{ + private std_optional_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java new file mode 100644 index 00000000..7420f29f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +public final class std_optional_std_string +{ + private std_optional_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..88f72999 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_MR_StdContainers_NonAssignable_float +{ + private std_pair_const_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java new file mode 100644 index 00000000..735a0a05 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int32_t_float +{ + private std_pair_const_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java new file mode 100644 index 00000000..59a1e6aa --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int32_t_ref_const_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int32_t_ref_const_float_ref +{ + private std_pair_const_int32_t_ref_const_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_ref_const_float_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_ref_const_float_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_ref_const_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_ref_const_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_ref_const_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_ref_const_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_ref_const_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_ref_const_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_ref_const_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_ref_const_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..9578cd6d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref +{ + private std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java new file mode 100644 index 00000000..5815f264 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_pair_int32_t_float +{ + private std_pair_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java new file mode 100644 index 00000000..2fc9da33 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int32_t_ref_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int32_t_ref_float_ref +{ + private std_pair_int32_t_ref_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_ref_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_ref_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_ref_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_ref_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_ref_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_ref_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_ref_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_ref_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..24d4c9b1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int32_t_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int32_t_rvalue_ref_float_rvalue_ref +{ + private std_pair_int32_t_rvalue_ref_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java new file mode 100644 index 00000000..cf394503 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int32_t_std_string`. Generated by mrbind, do not edit. */ +public final class std_pair_int32_t_std_string +{ + private std_pair_int32_t_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int32_t_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int32_t_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..57a1ce96 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_set_MR_StdContainers_NonAssignable +{ + private std_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java new file mode 100644 index 00000000..47712d97 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +public final class std_set_float +{ + private std_set_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java new file mode 100644 index 00000000..fd51c01e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_int32_t`. Generated by mrbind, do not edit. */ +public final class std_set_int32_t +{ + private std_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..aae58f97 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh +{ + private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..c17dc3ec --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SA +{ + private std_shared_ptr_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..5dcf8ce6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SE +{ + private std_shared_ptr_MR_CSharp_SE() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..00f8de85 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SG +{ + private std_shared_ptr_MR_CSharp_SG() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..a1b6747e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CommonBaseAB +{ + private std_shared_ptr_MR_CommonBaseAB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..d476159b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A +{ + private std_shared_ptr_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..8ddc8375 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..33a54a0a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..cf59e707 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_CSharp_SA +{ + private std_shared_ptr_const_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..3709e4fe --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A +{ + private std_shared_ptr_const_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..7fdac6d8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..6326b139 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java new file mode 100644 index 00000000..540761bf --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int32_t +{ + private std_shared_ptr_const_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java new file mode 100644 index 00000000..7367967d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int32_t_array +{ + private std_shared_ptr_const_int32_t_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java new file mode 100644 index 00000000..98504629 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int32_t_array_42 +{ + private std_shared_ptr_const_int32_t_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int32_t_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int32_t_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java new file mode 100644 index 00000000..7aa5bde9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_void +{ + private std_shared_ptr_const_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java new file mode 100644 index 00000000..aded4de4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int32_t +{ + private std_shared_ptr_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java new file mode 100644 index 00000000..10f2a40d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int32_t_array +{ + private std_shared_ptr_int32_t_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java new file mode 100644 index 00000000..b1a4925d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int32_t_array_42 +{ + private std_shared_ptr_int32_t_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int32_t_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int32_t_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java new file mode 100644 index 00000000..e4de6a56 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_void +{ + private std_shared_ptr_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java new file mode 100644 index 00000000..4e0bdf26 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +public final class std_string +{ + private std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java new file mode 100644 index 00000000..00e81830 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +public final class std_string_view +{ + private std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java new file mode 100644 index 00000000..8cbe446e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +public final class std_tuple +{ + private std_tuple() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8133ed79 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout +{ + private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..b4af3042 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..4014137c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java new file mode 100644 index 00000000..c9175330 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db +{ + private std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java new file mode 100644 index 00000000..65d074c8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b +{ + private std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int32_t_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java new file mode 100644 index 00000000..27e03114 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int32_t_std_string +{ + private std_tuple_const_int32_t_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_get_const_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_get_const_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int32_t_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int32_t_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java new file mode 100644 index 00000000..333a02a8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_float_double_int32_t_int32_t`. Generated by mrbind, do not edit. */ +public final class std_tuple_float_double_int32_t_int32_t +{ + private std_tuple_float_double_int32_t_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_double = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_double", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_double_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_double_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java new file mode 100644 index 00000000..7da7ec38 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int32_t`. Generated by mrbind, do not edit. */ +public final class std_tuple_int32_t +{ + private std_tuple_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java new file mode 100644 index 00000000..924a6744 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_tuple_int32_t_float +{ + private std_tuple_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..b1bec41c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref +{ + private std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int32_t_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int32_t_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java new file mode 100644 index 00000000..2b528db8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int32_t_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_int32_t_std_string +{ + private std_tuple_int32_t_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int32_t_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int32_t_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..5b7a55ab --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A +{ + private std_unique_ptr_MR_StdUniquePtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..86f55711 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A_array +{ + private std_unique_ptr_MR_StdUniquePtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java new file mode 100644 index 00000000..3e966821 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int32_t`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int32_t +{ + private std_unique_ptr_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java new file mode 100644 index 00000000..f11a0d00 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int32_t_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int32_t_array +{ + private std_unique_ptr_int32_t_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int32_t_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int32_t_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..4b9cd7ac --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_MR_StdContainers_NonAssignable_float +{ + private std_unordered_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java new file mode 100644 index 00000000..2bf218af --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_int32_t_float +{ + private std_unordered_map_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..805d3ea0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float +{ + private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java new file mode 100644 index 00000000..ef768079 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_int32_t_float +{ + private std_unordered_multimap_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int32_t_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int32_t_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..c33c45fd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_MR_StdContainers_NonAssignable +{ + private std_unordered_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java new file mode 100644 index 00000000..129e91e9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_int32_t`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_int32_t +{ + private std_unordered_multiset_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..b6f73a1c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_MR_StdContainers_NonAssignable +{ + private std_unordered_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java new file mode 100644 index 00000000..357d814f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_int32_t`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_int32_t +{ + private std_unordered_set_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java new file mode 100644 index 00000000..1f8bf10c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int32_t_float +{ + private std_variant_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_ConstructAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_ConstructAs_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_AssignAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_AssignAs_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java new file mode 100644 index 00000000..a88ed3e5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int32_t_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int32_t_float_float +{ + private std_variant_int32_t_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_ConstructAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_ConstructAs_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_ConstructAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_ConstructAs_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_AssignAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_AssignAs_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_AssignAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_AssignAs_float_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_float_1_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_float_1_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java new file mode 100644 index 00000000..9829ceea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int32_t_float_std_string`. Generated by mrbind, do not edit. */ +public final class std_variant_int32_t_float_std_string +{ + private std_variant_int32_t_float_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_ConstructAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_ConstructAs_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_ConstructAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_ConstructAs_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_AssignAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_AssignAs_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_AssignAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_AssignAs_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int32_t_float_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int32_t_float_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java new file mode 100644 index 00000000..2d5600f7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int32_t_float +{ + private std_variant_std_monostate_int32_t_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_AssignAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_AssignAs_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java new file mode 100644 index 00000000..ff3af79b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int32_t_float_float +{ + private std_variant_std_monostate_int32_t_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_int32_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int32_t_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int32_t_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java new file mode 100644 index 00000000..a4e51525 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_A +{ + private std_vector_MR_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f79d0158 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_A_ptr +{ + private std_vector_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..7bd0bb53 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_ExposedLayout +{ + private std_vector_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..d347fddd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,63 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonAssignable +{ + private std_vector_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..529230bb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonDefaultConstructible +{ + private std_vector_MR_StdContainers_NonDefaultConstructible() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f8a752ed --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_const_MR_CSharp_A_ptr +{ + private std_vector_const_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java new file mode 100644 index 00000000..da3a1781 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_expected_int32_t_std_string`. Generated by mrbind, do not edit. */ +public final class std_vector_expected_int32_t_std_string +{ + private std_vector_expected_int32_t_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_expected_int32_t_std_string_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_expected_int32_t_std_string_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java new file mode 100644 index 00000000..a2030081 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_int32_t`. Generated by mrbind, do not edit. */ +public final class std_vector_int32_t +{ + private std_vector_int32_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int32_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int32_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int32_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int32_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int32_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int32_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int32_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int32_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java new file mode 100644 index 00000000..02ded0de --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_int64_t`. Generated by mrbind, do not edit. */ +public final class std_vector_int64_t +{ + private std_vector_int64_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java new file mode 100644 index 00000000..cf72279e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_uint64_t`. Generated by mrbind, do not edit. */ +public final class std_vector_uint64_t +{ + private std_vector_uint64_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_uint64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_uint64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_uint64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_uint64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_uint64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_uint64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_uint64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_uint64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java new file mode 100644 index 00000000..0e7b8b0e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java @@ -0,0 +1,149 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_A_AssignFromAnother()`. + */ + public mrbind_test.mr.A assignFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_A_Get_x()`. + */ + public mrbind_test.mr.cs.std_string x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_A_Set_x()`. + */ + public void setX(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java new file mode 100644 index 00000000..15628025 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java @@ -0,0 +1,83 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::CommonBaseAB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::SeparateA` + * `MR::SeparateB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CommonBaseAB::CommonBaseAB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CommonBaseAB_ConstructFromAnother()`. + */ + public CommonBaseAB(mrbind_test.mr.CommonBaseAB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CommonBaseAB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CommonBaseAB_AssignFromAnother()`. + */ + public mrbind_test.mr.CommonBaseAB assignFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java new file mode 100644 index 00000000..42a7a99a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java @@ -0,0 +1,120 @@ +package mrbind_test.mr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::foo`. + * + * Calls `MR_foo()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_foo.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::bar`. + * + * Calls `MR_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_vector_MR_A _1) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_bar.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generate a `shared_ptr` for this as well, to test how that gets separated. + * Generated from function `MR::mark_shared_common_base_ab`. + * + * Calls `MR_mark_shared_common_base_ab()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB mark_shared_common_base_ab() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_mark_shared_common_base_ab.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecA`. + * + * Calls `MR_GetSeparateVecA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateA GetSeparateVecA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_GetSeparateVecA.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecB`. + * + * Calls `MR_GetSeparateVecB()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateB GetSeparateVecB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_GetSeparateVecB.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetCombinedVecAB`. + * + * Calls `MR_GetCombinedVecAB()`. + */ + public static mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB GetCombinedVecAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_combined_a_b.H0.MR_GetCombinedVecAB.invokeExact(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java new file mode 100644 index 00000000..a642c4fb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateA`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.a.H0.MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateA::SeparateA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateA_ConstructFromAnother()`. + */ + public SeparateA(mrbind_test.mr.SeparateA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateA_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java new file mode 100644 index 00000000..860759b4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateB`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.b.H0.MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateB::SeparateB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateB_ConstructFromAnother()`. + */ + public SeparateB(mrbind_test.mr.SeparateB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateB_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java new file mode 100644 index 00000000..67833c53 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java @@ -0,0 +1,34 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::A`. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} + + /** + * Generated from method `MR::AbstractClasses::A::foo`. + * + * Calls `MR_AbstractClasses_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java new file mode 100644 index 00000000..14d768cc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java @@ -0,0 +1,49 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::C` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from method `MR::AbstractClasses::B::foo`. + * + * Calls `MR_AbstractClasses_B_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java new file mode 100644 index 00000000..51287160 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java new file mode 100644 index 00000000..dd8b19b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,203 @@ +package mrbind_test.mr.adjustingnames; + +/** + * And test that `uint64_t` is correctly adjusted in some other kinds of names. + * Though here we don't really test that each of them brings its own includes. + * Generated from class `MR::AdjustingNames::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_AdjustingNames_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::AdjustingNames::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_AdjustingNames_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.adjustingnames.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::AdjustingNames::A::operator MR_C_uint64_t`. + * + * Calls `MR_AdjustingNames_A_ConvertTo_uint64_t()`. + */ + public long convertTo_uint64_t() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConvertTo_uint64_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_AdjustingNames_A_AssignFromAnother()`. + */ + public mrbind_test.mr.adjustingnames.A assignFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.adjustingnames.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::foo`. + * + * Calls `MR_AdjustingNames_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::bar`. + * + * Calls `MR_AdjustingNames_A_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::AdjustingNames::A` named `var`. + * + * Calls `MR_AdjustingNames_A_Get_var_uint64_t()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_uint64_t.invokeExact(); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::AdjustingNames::A` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_AdjustingNames_A_Set_var_uint64_t()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_uint64_t.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java new file mode 100644 index 00000000..9c07a3d2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.adjustingnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * When we're gonna call `foo()` in the source file, we must include the header for our typedef (and for the template arguments in general). + * And we must make sure that the typedef gets applied to the name correctly. + * Generated from function `MR::AdjustingNames::foo`. + * + * Calls `MR_AdjustingNames_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::AdjustingNames::bar`. + * + * Calls `MR_AdjustingNames_bar()`. + */ + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_bar.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java new file mode 100644 index 00000000..1c58c8df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,221 @@ +package mrbind_test.mr.aggregates; + +/** + * Aggregates get elementwise constructors. This is necessary if their elements are not default-constructible, + * because otherwise there would be no way to construct them. + * Generated from class `MR::Aggregates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::A` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * The reference to the parameter `y` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFrom()`. + */ + public A(int x, java.lang.String y) + { + this(__ctor_constructFrom(x, y), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x, java.lang.String y) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_y = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(y, "y")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFrom.invokeExact(x, __str_y, mrbind_test.Ffi.end(__str_y)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.aggregates.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_A_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.A assignFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_Aggregates_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_y()`. + */ + public mrbind_test.mr.cs.std_string y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `y`. + * The reference to the parameter `value` might be preserved in this object in element `y`. + * + * Calls `MR_Aggregates_A_Set_y()`. + */ + public void setY(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java new file mode 100644 index 00000000..1dbcbb83 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.aggregates; + +/** + * This is an empty aggregate, it doesn't need an elementwise constructor. + * Generated from class `MR::Aggregates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.aggregates.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_B_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.B assignFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java new file mode 100644 index 00000000..e5c5a396 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,493 @@ +package mrbind_test.mr.aggregates; + +/** + * Test the optional limit on the number of fields that we aggregate-initialize. + * Generated from class `MR::Aggregates::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::C` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * The reference to the parameter `e` might be preserved in the constructed object. + * The reference to the parameter `f` might be preserved in the constructed object. + * The reference to the parameter `g` might be preserved in the constructed object. + * The reference to the parameter `h` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_C_ConstructFrom()`. + */ + public C(int a, int b, int c, int d, int e, int f, int g, int h) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.aggregates.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_C_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.C assignFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_Aggregates_C_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_Aggregates_C_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `c`. + * The reference to the parameter `value` might be preserved in this object in element `c`. + * + * Calls `MR_Aggregates_C_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `d`. + * The reference to the parameter `value` might be preserved in this object in element `d`. + * + * Calls `MR_Aggregates_C_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_Aggregates_C_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `f`. + * The reference to the parameter `value` might be preserved in this object in element `f`. + * + * Calls `MR_Aggregates_C_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `g`. + * The reference to the parameter `value` might be preserved in this object in element `g`. + * + * Calls `MR_Aggregates_C_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `h`. + * The reference to the parameter `value` might be preserved in this object in element `h`. + * + * Calls `MR_Aggregates_C_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..8dbd994e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,506 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.aggregates.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_D_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.D assignFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_Aggregates_D_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_Aggregates_D_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `c`. + * The reference to the parameter `value` might be preserved in this object in element `c`. + * + * Calls `MR_Aggregates_D_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `d`. + * The reference to the parameter `value` might be preserved in this object in element `d`. + * + * Calls `MR_Aggregates_D_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_Aggregates_D_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `f`. + * The reference to the parameter `value` might be preserved in this object in element `f`. + * + * Calls `MR_Aggregates_D_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `g`. + * The reference to the parameter `value` might be preserved in this object in element `g`. + * + * Calls `MR_Aggregates_D_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `h`. + * The reference to the parameter `value` might be preserved in this object in element `h`. + * + * Calls `MR_Aggregates_D_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `i`. + * The reference to the parameter `value` might be preserved in this object in element `i`. + * + * Calls `MR_Aggregates_D_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..14e509fe --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,587 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::E`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.aggregates.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::Aggregates::E` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * The reference to the parameter `e` might be preserved in the constructed object. + * The reference to the parameter `f` might be preserved in the constructed object. + * The reference to the parameter `g` might be preserved in the constructed object. + * The reference to the parameter `h` might be preserved in the constructed object. + * The reference to the parameter `i` might be preserved in the constructed object. + * The reference to the parameter `j` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFrom()`. + */ + public E(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h, i, j), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i, mrbind_test.Ffi.ptrNonNull(j, "j")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(j); + } + } + + /** + * Generated from method `MR::Aggregates::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_E_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.E assignFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_Aggregates_E_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_Aggregates_E_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `c`. + * The reference to the parameter `value` might be preserved in this object in element `c`. + * + * Calls `MR_Aggregates_E_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `d`. + * The reference to the parameter `value` might be preserved in this object in element `d`. + * + * Calls `MR_Aggregates_E_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_Aggregates_E_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `f`. + * The reference to the parameter `value` might be preserved in this object in element `f`. + * + * Calls `MR_Aggregates_E_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `g`. + * The reference to the parameter `value` might be preserved in this object in element `g`. + * + * Calls `MR_Aggregates_E_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `h`. + * The reference to the parameter `value` might be preserved in this object in element `h`. + * + * Calls `MR_Aggregates_E_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `i`. + * The reference to the parameter `value` might be preserved in this object in element `i`. + * + * Calls `MR_Aggregates_E_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `j`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_j()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible j() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `j`. + * The reference to the parameter `value` might be preserved in this object in element `j`. + * + * Calls `MR_Aggregates_E_Set_j()`. + */ + public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java new file mode 100644 index 00000000..2c1975e4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java @@ -0,0 +1,78 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible assignFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java new file mode 100644 index 00000000..a100b584 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java @@ -0,0 +1,114 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::A`. + * Derived classes: + * Virtual: + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * `MR::Bases::H` + * Indirect: (non-virtual) + * `MR::Bases::B2` + * Ambiguous: + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.bases.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_A_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.A assignFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java new file mode 100644 index 00000000..396fb8d5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::B2` + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.bases.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java new file mode 100644 index 00000000..5e992aa0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Indirect: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B2_DefaultConstruct()`. + */ + public B2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B2::B2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B2_ConstructFromAnother()`. + */ + public B2(mrbind_test.mr.bases.B2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java new file mode 100644 index 00000000..a7d62d1c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.bases.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_C_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java new file mode 100644 index 00000000..31d7a8b3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.bases.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D assignFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java new file mode 100644 index 00000000..75d36cd7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D2_DefaultConstruct()`. + */ + public D2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D2::D2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D2_ConstructFromAnother()`. + */ + public D2(mrbind_test.mr.bases.D2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D2 assignFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java new file mode 100644 index 00000000..e8f31dbb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D3`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D3 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D3(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D3::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D3_DefaultConstruct()`. + */ + public D3() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D3::D3`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D3_ConstructFromAnother()`. + */ + public D3(mrbind_test.mr.bases.D3 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D3::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D3_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D3 assignFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D3(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java new file mode 100644 index 00000000..fd4f95ab --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::E`. + * Derived classes: + * Non-virtual along a virtual path: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.bases.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_E_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.E assignFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java new file mode 100644 index 00000000..1fb06238 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::E` + * Derived classes: + * Virtual: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.bases.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_F_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java new file mode 100644 index 00000000..22ddd4d1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::G`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.bases.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_G_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java new file mode 100644 index 00000000..201dfda9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::H`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * Direct: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.bases.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_H_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java new file mode 100644 index 00000000..b4c1d375 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::I`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * `MR::Bases::A` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.bases.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_I_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java new file mode 100644 index 00000000..447c528d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.convops; + +/** + * Generated from class `MR::ConvOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_ConvOps_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::ConvOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_ConvOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.convops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::ConvOps::A::operator bool`. + * + * Calls `MR_ConvOps_A_ConvertTo_bool()`. + */ + public boolean convertTo_bool() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConvertTo_bool.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::ConvOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_ConvOps_A_AssignFromAnother()`. + */ + public mrbind_test.mr.convops.A assignFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.convops.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java new file mode 100644 index 00000000..c5f8cf9f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,283 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::A`. + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::A` elementwise. + * The reference to the parameter `Field` might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFrom()`. + */ + public A(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFrom.invokeExact(Field); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.copyinheritedmembers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::A::operator int32_t`. + * + * Calls `MR_CopyInheritedMembers_A_ConvertTo_int32_t()`. + */ + public int convertTo_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConvertTo_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.A assignFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::Method`. + * + * Calls `MR_CopyInheritedMembers_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * The reference to the parameter `value` might be preserved in this object in element `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * The reference to the parameter `value` might be preserved in this object in element `Field`. + * + * Calls `MR_CopyInheritedMembers_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..c714315b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,273 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::B` elementwise. + * The reference to the parameter `Field` might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFrom()`. + */ + public B(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFrom.invokeExact(Field); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.copyinheritedmembers.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::B::operator int32_t`. + * + * Calls `MR_CopyInheritedMembers_B_ConvertTo_int32_t()`. + */ + public int convertTo_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConvertTo_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_B_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.B assignFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::Method`. + * + * Calls `MR_CopyInheritedMembers_B_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_B_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * The reference to the parameter `value` might be preserved in this object in element `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_B_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * The reference to the parameter `value` might be preserved in this object in element `Field`. + * + * Calls `MR_CopyInheritedMembers_B_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..012b1910 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.copyinheritedmembers.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_C_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java new file mode 100644 index 00000000..c997ee4f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::B` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.copyinheritedmembers.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_D_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java new file mode 100644 index 00000000..a7c27e18 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::E`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.copyinheritedmembers.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_E_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java new file mode 100644 index 00000000..0bf68086 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::D` + * `MR::CopyInheritedMembers::A` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.copyinheritedmembers.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_F_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java new file mode 100644 index 00000000..2abb5887 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::G`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.copyinheritedmembers.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_G_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java new file mode 100644 index 00000000..9b1ecf78 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::H`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.copyinheritedmembers.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_H_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java new file mode 100644 index 00000000..84e4cce3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::I`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.copyinheritedmembers.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_I_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java new file mode 100644 index 00000000..777f1f91 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,112 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::J`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class J extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public J(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? J::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_J_DefaultConstruct()`. + */ + public J() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::J::J`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_J_ConstructFromAnother()`. + */ + public J(mrbind_test.mr.copyinheritedmembers.J _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_J_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java new file mode 100644 index 00000000..3230b2ca --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::K`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class K extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public K(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? K::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_K_DefaultConstruct()`. + */ + public K() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::K::K`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_K_ConstructFromAnother()`. + */ + public K(mrbind_test.mr.copyinheritedmembers.K _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::K::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_K_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.K assignFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.K(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java new file mode 100644 index 00000000..5cc2c84f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::L`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::J` + * `MR::CopyInheritedMembers::G` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class L extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public L(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? L::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_L_DefaultConstruct()`. + */ + public L() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::L::L`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_L_ConstructFromAnother()`. + */ + public L(mrbind_test.mr.copyinheritedmembers.L _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::L::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_L_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.L assignFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.L(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java new file mode 100644 index 00000000..02af22bb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,112 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Now test that a non-virtual base of a virtual base gets treated as a virtual. + * Generated from class `MR::CopyInheritedMembers::M`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class M extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public M(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? M::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_M_DefaultConstruct()`. + */ + public M() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::M::M`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_M_ConstructFromAnother()`. + */ + public M(mrbind_test.mr.copyinheritedmembers.M _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_M_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java new file mode 100644 index 00000000..3562890d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,111 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::N`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::M` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class N extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public N(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? N::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_N_DefaultConstruct()`. + */ + public N() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::N::N`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_N_ConstructFromAnother()`. + */ + public N(mrbind_test.mr.copyinheritedmembers.N _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_N_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java new file mode 100644 index 00000000..65789897 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::O`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::M` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class O extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public O(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? O::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_O_DefaultConstruct()`. + */ + public O() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::O::O`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_O_ConstructFromAnother()`. + */ + public O(mrbind_test.mr.copyinheritedmembers.O _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_O_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java new file mode 100644 index 00000000..aab38b96 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java @@ -0,0 +1,2568 @@ +package mrbind_test.mr.cs; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Returns the `stdout` stream. + * + * Calls `MR_C_GetStdCout()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCout.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, buffered. + * + * Calls `MR_C_GetStdCerr()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCerr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCerr.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, unbuffered. + * + * Calls `MR_C_GetStdClog()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdClog() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdClog.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stdin` stream. + * + * Calls `MR_C_GetStdCin()`. + */ + public static mrbind_test.mr.cs.std_istream GetStdCin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCin.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_istream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator a, mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_flat_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator a, mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_node_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator a, mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator a, mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_equal_MR_C_phmap_btree_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator a, mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multiset_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator a, mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_equal_MR_C_phmap_btree_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator a, mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator a, mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_uint64_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_uint64_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_uint64_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_uint64_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int64_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, mrbind_test.mr.cs.std_vector_int64_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int64_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, mrbind_test.mr.cs.std_vector_int64_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int64_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind_test.mr.cs.std_vector_int64_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int64_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind_test.mr.cs.std_vector_int64_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int32_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int32_t_const_iterator a, mrbind_test.mr.cs.std_vector_int32_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_sub_MR_C_std_vector_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int32_t_const_iterator a, mrbind_test.mr.cs.std_vector_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_equal_MR_C_std_vector_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int32_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int32_t_iterator a, mrbind_test.mr.cs.std_vector_int32_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_sub_MR_C_std_vector_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int32_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int32_t_iterator a, mrbind_test.mr.cs.std_vector_int32_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_equal_MR_C_std_vector_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int32_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int32_t_const_iterator a, mrbind_test.mr.cs.std_deque_int32_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_sub_MR_C_std_deque_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int32_t_const_iterator a, mrbind_test.mr.cs.std_deque_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_equal_MR_C_std_deque_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int32_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int32_t_iterator a, mrbind_test.mr.cs.std_deque_int32_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_sub_MR_C_std_deque_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int32_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int32_t_iterator a, mrbind_test.mr.cs.std_deque_int32_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_equal_MR_C_std_deque_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int32_t_const_iterator a, mrbind_test.mr.cs.std_list_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_equal_MR_C_std_list_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int32_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int32_t_iterator a, mrbind_test.mr.cs.std_list_int32_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_equal_MR_C_std_list_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_int32_t_const_iterator a, mrbind_test.mr.cs.std_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_equal_MR_C_std_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator a, mrbind_test.mr.cs.std_multiset_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_equal_MR_C_std_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator a, mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_equal_MR_C_std_unordered_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_int32_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_equal_MR_C_std_unordered_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator a, mrbind_test.mr.cs.std_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_equal_MR_C_std_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int32_t_float_iterator a, mrbind_test.mr.cs.std_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_equal_MR_C_std_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator a, mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator a, mrbind_test.mr.cs.std_multimap_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator a, mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_float_const_iterator a, mrbind_test.mr.cs.std_multiset_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_equal_MR_C_std_multiset_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_float_const_iterator a, mrbind_test.mr.cs.std_set_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_equal_MR_C_std_set_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator a, mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator a, mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..820e7284 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::E1` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_E1_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_E1_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_E1_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_E1_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_E1_float(mrbind_test.mr.cs.expected_MR_CSharp_E1_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_E1_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_E1_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_value()`. + */ + public mrbind_test.mr.csharp.E1 value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_E1_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..4c0eecc8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayoutSh` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_ExposedLayoutSh_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_ExposedLayoutSh_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_ExposedLayoutSh_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_ExposedLayoutSh_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_ExposedLayoutSh_float(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..72c44239 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayout` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_ExposedLayout_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_ExposedLayout_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_ExposedLayout_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_ExposedLayout_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_ExposedLayout_float(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_ExposedLayout_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..7576c34a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::NonTrivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_NonTrivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_NonTrivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_NonTrivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_NonTrivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_NonTrivial_float(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_NonTrivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..5ae35ef8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::SA` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_SA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_SA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_SA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_SA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_SA_float(mrbind_test.mr.cs.expected_MR_CSharp_SA_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_SA_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_SA_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_SA_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..ab4ab472 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::Trivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_MR_CSharp_Trivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_MR_CSharp_Trivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_MR_CSharp_Trivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_DefaultConstruct()`. + */ + public expected_MR_CSharp_Trivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_ConstructFromAnother()`. + */ + public expected_MR_CSharp_Trivial_float(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float other) + { + try + { + mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_MR_CSharp_Trivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java new file mode 100644 index 00000000..701d8cb2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int32_t` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_int32_t_float_DefaultConstruct()`. + */ + public expected_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_int32_t_float_ConstructFromAnother()`. + */ + public expected_int32_t_float(mrbind_test.mr.cs.expected_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_int32_t_float other) + { + try + { + mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_int32_t_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int32_t`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_float_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int32_t`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java new file mode 100644 index 00000000..2dc5e320 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int32_t` that represents success or a `std::string` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_int32_t_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_int32_t_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_int32_t_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_int32_t_std_string_DefaultConstruct()`. + */ + public expected_int32_t_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_int32_t_std_string_ConstructFromAnother()`. + */ + public expected_int32_t_std_string(mrbind_test.mr.cs.expected_int32_t_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_int32_t_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_int32_t_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_int32_t_std_string other) + { + try + { + mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_int32_t_std_string_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int32_t`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_std_string_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_std_string_error()`. + */ + public mrbind_test.mr.cs.std_string error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_error.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int32_t`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_std_string_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_int32_t_std_string_error_mut()`. + */ + public mrbind_test.mr.cs.std_string error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_error_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java new file mode 100644 index 00000000..7720f0b1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.cs; + +/** + * Stores either nothing (which represents success) or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class expected_void_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public expected_void_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? expected_void_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_expected_void_float_DefaultConstruct()`. + */ + public expected_void_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_expected_void_float_ConstructFromAnother()`. + */ + public expected_void_float(mrbind_test.mr.cs.expected_void_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.expected_void_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_expected_void_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.expected_void_float other) + { + try + { + mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_expected_void_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores nothing (which represents success). + * + * Calls `MR_C_expected_void_float_value()`. + */ + public boolean value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_void_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_expected_void_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..403ce62b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,285 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::A` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_A_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_A_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_A_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_A_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother()`. + */ + public std_array_MR_StdContainers_A_42(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at()`. + */ + public mrbind_test.mr.stdcontainers.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..57e3e512 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,234 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::NonAssignable` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_NonAssignable_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_NonAssignable_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_NonAssignable_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_NonAssignable_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_43.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_43.java new file mode 100644 index 00000000..0bca0e85 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_43.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int32_t` of size 43. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int32_t_43 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(43, java.lang.foreign.ValueLayout.JAVA_INT)}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 172, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int32_t_43(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int32_t_43 copy() {return new std_array_int32_t_43(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int32_t_43 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4);} + public void setElems(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int32_t_43() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_array_4_array_3_5.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_array_4_array_3_5.java new file mode 100644 index 00000000..2e226126 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_int32_t_array_4_array_3_5.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int32_t[3][4]` of size 5. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int32_t_array_4_array_3_5 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.ValueLayout.JAVA_INT)))}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 240, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int32_t_array_4_array_3_5(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int32_t_array_4_array_3_5 copy() {return new std_array_int32_t_array_4_array_3_5(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int32_t_array_4_array_3_5 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0, int i1, int i2) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4);} + public void setElems(int i0, int i1, int i2, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int32_t_array_4_array_3_5() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..364c23ca --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,647 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..839bd273 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..794591d9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java new file mode 100644 index 00000000..59601cad --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java @@ -0,0 +1,837 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int32_t_DefaultConstruct()`. + */ + public std_deque_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int32_t_ConstructFromAnother()`. + */ + public std_deque_int32_t(mrbind_test.mr.cs.std_deque_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t other) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_deque_int32_t_ConstructFromRange()`. + */ + public std_deque_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_deque_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_int32_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_deque_int32_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_int32_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_push_front.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_int32_t_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int32_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_deque_int32_t_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int32_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_deque_int32_t_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_deque_int32_t_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_deque_int32_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_deque_int32_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_deque_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int32_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int32_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_deque_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int32_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_int32_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_int32_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_int32_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java new file mode 100644 index 00000000..77b410f3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_deque_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_deque_int32_t_const_iterator(mrbind_test.mr.cs.std_deque_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_from_mutable()`. + */ + public std_deque_int32_t_const_iterator(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int32_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java new file mode 100644 index 00000000..c92b9738 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int32_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int32_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int32_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int32_t_iterator_DefaultConstruct()`. + */ + public std_deque_int32_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int32_t_iterator_ConstructFromAnother()`. + */ + public std_deque_int32_t_iterator(mrbind_test.mr.cs.std_deque_int32_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int32_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int32_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int32_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_int32_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_int32_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int32_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java new file mode 100644 index 00000000..23673da5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.cs; + +/** + * Stores a filesystem path. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_filesystem_path extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_filesystem_path(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_filesystem_path::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_filesystem_path_DefaultConstruct()`. + */ + public std_filesystem_path() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_filesystem_path_ConstructFromAnother()`. + */ + public std_filesystem_path(mrbind_test.mr.cs.std_filesystem_path other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_filesystem_path_ConstructFrom()`. + */ + public std_filesystem_path(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_filesystem_path_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_filesystem_path_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Get the contents as a UTF8-encoded string. + * + * Calls `MR_C_std_filesystem_path_string()`. + */ + public mrbind_test.mr.cs.std_string string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_string.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..64c10005 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::E1(MR::CSharp::E1)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_E1_from_MR_CSharp_E1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call()`. + */ + public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call.invokeExact(rawPointer(), java.util.Objects.requireNonNull(_1, "_1").value); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..4da61b51 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::ExposedLayoutC(MR::CSharp::ExposedLayoutC)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.csharp.ExposedLayoutC(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..74e62668 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::A(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_A(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_A_call()`. + */ + public mrbind_test.mr.stdfunction.A call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_call.invokeExact(rawPointer()); + return new mrbind_test.mr.stdfunction.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java new file mode 100644 index 00000000..f4f0a418 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::E(int32_t, MR::StdFunction::E)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call()`. + */ + public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call.invokeExact(rawPointer(), _1, java.util.Objects.requireNonNull(_2, "_2").value); + return mrbind_test.mr.stdfunction.E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java new file mode 100644 index 00000000..2816e9be --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int32_t(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int32_t_DefaultConstruct()`. + */ + public std_function_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int32_t_ConstructFromAnother()`. + */ + public std_function_int32_t(mrbind_test.mr.cs.std_function_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t other) + { + try + { + mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int32_t_call()`. + */ + public int call() + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_call.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java new file mode 100644 index 00000000..8b2f48f5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int32_t(int32_t, int32_t)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int32_t_from_int32_t_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int32_t_from_int32_t_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int32_t_from_int32_t_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_DefaultConstruct()`. + */ + public std_function_int32_t_from_int32_t_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructFromAnother()`. + */ + public std_function_int32_t_from_int32_t_int32_t(mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t other) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_call()`. + */ + public int call(int _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java new file mode 100644 index 00000000..59b79e4c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int32_t(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int32_t_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int32_t_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int32_t_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int32_t_from_std_string_DefaultConstruct()`. + */ + public std_function_int32_t_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int32_t_from_std_string_ConstructFromAnother()`. + */ + public std_function_int32_t_from_std_string(mrbind_test.mr.cs.std_function_int32_t_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int32_t_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int32_t_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int32_t_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int32_t_from_std_string_call()`. + */ + public int call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java new file mode 100644 index 00000000..01802e67 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int32_t &(int32_t &, int32_t &&)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref(mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call.invokeExact(rawPointer(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java new file mode 100644 index 00000000..db8db93d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int32_t &&(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int32_t_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int32_t_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int32_t_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int32_t_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int32_t_rvalue_ref(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_call.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java new file mode 100644 index 00000000..21c927b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int32_t, float)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_DefaultConstruct()`. + */ + public std_function_std_string_from_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_ConstructFromAnother()`. + */ + public std_function_std_string_from_int32_t_float(mrbind_test.mr.cs.std_function_std_string_from_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int32_t_float other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_call.invokeExact(rawPointer(), _1, _2); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java new file mode 100644 index 00000000..0514d01e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int32_t, int32_t)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int32_t_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int32_t_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int32_t_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_DefaultConstruct()`. + */ + public std_function_std_string_from_int32_t_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_ConstructFromAnother()`. + */ + public std_function_std_string_from_int32_t_int32_t(mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java new file mode 100644 index 00000000..583639ae --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,163 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_DefaultConstruct()`. + */ + public std_function_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_ConstructFromAnother()`. + */ + public std_function_void(mrbind_test.mr.cs.std_function_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_call()`. + */ + public void call() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_call.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..3523af97 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(MR::StdFunction::A)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_void_from_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_void_from_MR_StdFunction_A(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_call()`. + */ + public void call(mrbind_test.mr.stdfunction.A _1) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java new file mode 100644 index 00000000..d796473e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java @@ -0,0 +1,163 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(int32_t, int32_t)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_int32_t_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_int32_t_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_int32_t_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_DefaultConstruct()`. + */ + public std_function_void_from_int32_t_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_ConstructFromAnother()`. + */ + public std_function_void_from_int32_t_int32_t(mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t other) + { + try + { + mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_call()`. + */ + public void call(int _1, int _2) + { + try + { + mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java new file mode 100644 index 00000000..7bb6b3e1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_std_string_DefaultConstruct()`. + */ + public std_function_void_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructFromAnother()`. + */ + public std_function_void_from_std_string(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_std_string_call()`. + */ + public void call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_istream.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_istream.java new file mode 100644 index 00000000..3b52c064 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_istream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ input stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_istream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_istream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..61393950 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,667 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonAssignable value) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..dbd2bee2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..fdf69831 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java new file mode 100644 index 00000000..b6de7906 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java @@ -0,0 +1,702 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int32_t_DefaultConstruct()`. + */ + public std_list_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int32_t_ConstructFromAnother()`. + */ + public std_list_int32_t(mrbind_test.mr.cs.std_list_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t other) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_list_int32_t_ConstructFromRange()`. + */ + public std_list_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_list_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_int32_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_int32_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_int32_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_push_front.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_int32_t_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_int32_t_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_int32_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_int32_t_iterator position) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_int32_t_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_int32_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_int32_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_list_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_int32_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_int32_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_list_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_int32_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_int32_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java new file mode 100644 index 00000000..c86949e9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_list_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_list_int32_t_const_iterator(mrbind_test.mr.cs.std_list_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_int32_t_const_iterator_from_mutable()`. + */ + public std_list_int32_t_const_iterator(mrbind_test.mr.cs.std_list_int32_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_int32_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java new file mode 100644 index 00000000..e64e1a55 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int32_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int32_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int32_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int32_t_iterator_DefaultConstruct()`. + */ + public std_list_int32_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int32_t_iterator_ConstructFromAnother()`. + */ + public std_list_int32_t_iterator(mrbind_test.mr.cs.std_list_int32_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int32_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int32_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t_iterator other) + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int32_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_int32_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_int32_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..cc42abec --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,443 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..d1a60086 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,239 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..083af903 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java new file mode 100644 index 00000000..532c3c86 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int32_t_float_DefaultConstruct()`. + */ + public std_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int32_t_float_ConstructFromAnother()`. + */ + public std_map_int32_t_float(mrbind_test.mr.cs.std_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float other) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_find()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_end()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..27d934be --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public std_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_int32_t_float_const_iterator(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_from_mutable()`. + */ + public std_map_int32_t_float_const_iterator(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_int32_t_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java new file mode 100644 index 00000000..86411394 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public std_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public std_map_int32_t_float_iterator(mrbind_test.mr.cs.std_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_int32_t_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..b0310ed0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,419 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..d430643b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,239 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..83fc860e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java new file mode 100644 index 00000000..f7ad26f5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java @@ -0,0 +1,416 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int32_t_float_DefaultConstruct()`. + */ + public std_multimap_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int32_t_float_ConstructFromAnother()`. + */ + public std_multimap_int32_t_float(mrbind_test.mr.cs.std_multimap_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float other) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_int32_t_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java new file mode 100644 index 00000000..678c8ccb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_int32_t_float_const_iterator(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_from_mutable()`. + */ + public std_multimap_int32_t_float_const_iterator(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java new file mode 100644 index 00000000..01513902 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_DefaultConstruct()`. + */ + public std_multimap_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_int32_t_float_iterator(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_int32_t_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..fd42ebc6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..ff69a03d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java new file mode 100644 index 00000000..d80185d4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_DefaultConstruct()`. + */ + public std_multiset_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_ConstructFromAnother()`. + */ + public std_multiset_float(mrbind_test.mr.cs.std_multiset_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_float_ConstructFromRange()`. + */ + public std_multiset_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_float_count()`. + */ + public long count(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_find()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_multiset_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_end()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java new file mode 100644 index 00000000..8ddef650 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_const_iterator_DefaultConstruct()`. + */ + public std_multiset_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_float_const_iterator(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java new file mode 100644 index 00000000..d3f377c8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int32_t_DefaultConstruct()`. + */ + public std_multiset_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int32_t_ConstructFromAnother()`. + */ + public std_multiset_int32_t(mrbind_test.mr.cs.std_multiset_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int32_t other) + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_int32_t_ConstructFromRange()`. + */ + public std_multiset_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_int32_t_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int32_t_find()`. + */ + public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java new file mode 100644 index 00000000..ee7901aa --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_multiset_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_int32_t_const_iterator(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..ce408ae2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::ExposedLayoutSh` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..2c061c30 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::NonTrivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.csharp.NonTrivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..cd6a0182 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::SA` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFrom()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.csharp.SA other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..5c53b3d8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::Trivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.csharp.Trivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..2c97f2c8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::A` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.stdoptional.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value()`. + */ + public mrbind_test.mr.stdoptional.A value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value_mut()`. + */ + public mrbind_test.mr.stdoptional.A value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..4e138404 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::B` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.stdoptional.B other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value()`. + */ + public mrbind_test.mr.stdoptional.B value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value_mut()`. + */ + public mrbind_test.mr.stdoptional.B value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..973c94d4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::E` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.stdoptional.E other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value()`. + */ + public mrbind_test.mr.stdoptional.E value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : mrbind_test.mr.stdoptional.E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java new file mode 100644 index 00000000..dd5d3072 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `int32_t` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_int32_t_DefaultConstruct()`. + */ + public std_optional_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_int32_t_ConstructFromAnother()`. + */ + public std_optional_int32_t(mrbind_test.mr.cs.std_optional_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_int32_t_ConstructFrom()`. + */ + public std_optional_int32_t(int other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_int32_t other) + { + try + { + mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_int32_t_AssignFrom()`. + */ + public void assignFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int32_t_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int32_t_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java new file mode 100644 index 00000000..b0a2b676 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `std::string` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_std_string_DefaultConstruct()`. + */ + public std_optional_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_std_string_ConstructFromAnother()`. + */ + public std_optional_std_string(mrbind_test.mr.cs.std_optional_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_std_string_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_optional_std_string(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + this(__ctor_constructFrom(other, other_end), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFrom.invokeExact(other, other_end); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_std_string_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFrom.invokeExact(rawPointer(), other, other_end); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value()`. + */ + public mrbind_test.mr.cs.std_string value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value_mut()`. + */ + public mrbind_test.mr.cs.std_string value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_ostream.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_ostream.java new file mode 100644 index 00000000..b3b4ce34 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_ostream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ output stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_ostream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_ostream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..a713a6bd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,202 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `MR::SeparateA` and `MR::SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(second, "second")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + java.lang.ref.Reference.reachabilityFence(second); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first()`. + */ + public mrbind_test.mr.SeparateA first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut()`. + */ + public mrbind_test.mr.SeparateA first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second()`. + */ + public mrbind_test.mr.SeparateB second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut()`. + */ + public mrbind_test.mr.SeparateB second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..f9e4db36 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const MR::StdContainers::NonAssignable` and `const MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java new file mode 100644 index 00000000..2eca5db3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int32_t` and `const int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_int32_t_float_DefaultConstruct()`. + */ + public std_pair_const_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_float_ConstructFromAnother()`. + */ + public std_pair_const_int32_t_float(mrbind_test.mr.cs.std_pair_const_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_float_Construct()`. + */ + public std_pair_const_int32_t_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java new file mode 100644 index 00000000..bcc98d99 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int32_t &` and `const int32_t &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int32_t_ref_const_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int32_t_ref_const_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int32_t_ref_const_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_ref_const_float_ref_ConstructFromAnother()`. + */ + public std_pair_const_int32_t_ref_const_float_ref(mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_ref_const_float_ref_Construct()`. + */ + public std_pair_const_int32_t_ref_const_float_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_ref_const_float_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_ref_const_float_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..00179c46 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int32_t &&` and `const int32_t &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref(mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct()`. + */ + public std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java new file mode 100644 index 00000000..f81cf3e1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int32_t` and `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int32_t_float_DefaultConstruct()`. + */ + public std_pair_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_float_ConstructFromAnother()`. + */ + public std_pair_int32_t_float(mrbind_test.mr.cs.std_pair_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int32_t_float other) + { + try + { + mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_float_Construct()`. + */ + public std_pair_int32_t_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_float_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_first_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java new file mode 100644 index 00000000..70385026 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java @@ -0,0 +1,96 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int32_t &` and `int32_t &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int32_t_ref_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int32_t_ref_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int32_t_ref_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_ref_float_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int32_t_ref_float_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_ref_float_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_first.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_ref_float_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_second.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..b6f7dec7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int32_t &&` and `int32_t &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int32_t_rvalue_ref_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int32_t_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int32_t_rvalue_ref_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_int32_t_rvalue_ref_float_rvalue_ref(mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int32_t_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_first.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_second.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java new file mode 100644 index 00000000..68d03e89 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int32_t` and `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int32_t_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int32_t_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int32_t_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int32_t_std_string_DefaultConstruct()`. + */ + public std_pair_int32_t_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_std_string_ConstructFromAnother()`. + */ + public std_pair_int32_t_std_string(mrbind_test.mr.cs.std_pair_int32_t_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int32_t_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int32_t_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int32_t_std_string other) + { + try + { + mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int32_t_std_string_Construct()`. + */ + public std_pair_int32_t_std_string(int first, java.lang.String second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, java.lang.String second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_second = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(second, "second")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_Construct.invokeExact(first, __str_second, mrbind_test.Ffi.end(__str_second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_std_string_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_std_string_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_first_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_std_string_second()`. + */ + public mrbind_test.mr.cs.std_string second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_second.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int32_t_std_string_second_mut()`. + */ + public mrbind_test.mr.cs.std_string second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_second_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..00ff59bc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..765c72fd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java new file mode 100644 index 00000000..5704c190 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_DefaultConstruct()`. + */ + public std_set_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_ConstructFromAnother()`. + */ + public std_set_float(mrbind_test.mr.cs.std_set_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_float_ConstructFromRange()`. + */ + public std_set_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_float_contains()`. + */ + public boolean contains(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_find()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_set_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_begin()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_end()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java new file mode 100644 index 00000000..838ca0bc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_const_iterator_DefaultConstruct()`. + */ + public std_set_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_const_iterator_ConstructFromAnother()`. + */ + public std_set_float_const_iterator(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java new file mode 100644 index 00000000..8f99f4c2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int32_t_DefaultConstruct()`. + */ + public std_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int32_t_ConstructFromAnother()`. + */ + public std_set_int32_t(mrbind_test.mr.cs.std_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int32_t other) + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_int32_t_ConstructFromRange()`. + */ + public std_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int32_t_find()`. + */ + public mrbind_test.mr.cs.std_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java new file mode 100644 index 00000000..8b617c6b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_set_int32_t_const_iterator(mrbind_test.mr.cs.std_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..4d678a2a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,402 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::ExposedLayoutSh`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructFromValue(mrbind_test.mr.csharp.ExposedLayoutSh value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh construct(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..facb8137 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..21ee446a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_get()`. + */ + public mrbind_test.mr.csharp.SE get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SE_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructFromValue(mrbind_test.mr.csharp.SE value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE construct(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..be0ebd72 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,374 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_get()`. + */ + public mrbind_test.mr.csharp.SG get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SG_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG construct(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG constructNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..6d7c1e54 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CommonBaseAB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CommonBaseAB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_get()`. + */ + public mrbind_test.mr.CommonBaseAB get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CommonBaseAB_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructFromValue(mrbind_test.mr.CommonBaseAB value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB construct(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Assign()`. + */ + public void assign(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..72405dac --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..83538f25 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,422 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..834ad452 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,374 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..347e61db --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,451 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..e67a8862 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,451 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..879623bd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,476 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..8cadbda3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,428 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java new file mode 100644 index 00000000..ca5a826c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_DefaultConstruct()`. + */ + public std_shared_ptr_const_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int32_t(mrbind_test.mr.cs.std_shared_ptr_const_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int32_t_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromValue.invokeExact(value); + return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int32_t(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int32_t(mrbind_test.mr.cs.std_shared_ptr_int32_t ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConstructAliasing()`. + */ + public std_shared_ptr_const_int32_t(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java new file mode 100644 index 00000000..7a81ce9d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java @@ -0,0 +1,472 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int32_t`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int32_t_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int32_t_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int32_t_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_int32_t_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int32_t_array(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int32_t_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_int32_t_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_Construct()`. + */ + public std_shared_ptr_const_int32_t_array(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int32_t_array(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int32_t_array(mrbind_test.mr.cs.std_shared_ptr_int32_t_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_int32_t_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java new file mode 100644 index 00000000..db781b35 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java @@ -0,0 +1,425 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int32_t`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int32_t_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int32_t_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int32_t_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_int32_t_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int32_t_array_42(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int32_t_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_Construct()`. + */ + public std_shared_ptr_const_int32_t_array_42(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int32_t_array_42(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int32_t_array_42(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_int32_t_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java new file mode 100644 index 00000000..b88c77cb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java @@ -0,0 +1,337 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_void_DefaultConstruct()`. + */ + public std_shared_ptr_const_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromAnother()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructNonOwning.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromMutable()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java new file mode 100644 index 00000000..347c32ab --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java @@ -0,0 +1,390 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_DefaultConstruct()`. + */ + public std_shared_ptr_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_ConstructFromAnother()`. + */ + public std_shared_ptr_int32_t(mrbind_test.mr.cs.std_shared_ptr_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int32_t_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int32_t_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int32_t_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int32_t_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int32_t_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_ConstructFromValue()`. + */ + public std_shared_ptr_int32_t(int value) + { + this(__ctor_constructFromValue(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructFromValue.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int32_t_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int32_t(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java new file mode 100644 index 00000000..4eff79a1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int32_t`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int32_t_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int32_t_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int32_t_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_DefaultConstruct()`. + */ + public std_shared_ptr_int32_t_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_ConstructFromAnother()`. + */ + public std_shared_ptr_int32_t_array(mrbind_test.mr.cs.std_shared_ptr_int32_t_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int32_t_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_ConstructFromSize()`. + */ + public std_shared_ptr_int32_t_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int32_t_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java new file mode 100644 index 00000000..fe243325 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int32_t`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int32_t_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int32_t_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int32_t_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_int32_t_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_int32_t_array_42(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int32_t_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int32_t_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java new file mode 100644 index 00000000..834a4952 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java @@ -0,0 +1,288 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_void_DefaultConstruct()`. + */ + public std_shared_ptr_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructFromAnother()`. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructNonOwning.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java new file mode 100644 index 00000000..2c2e1435 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java @@ -0,0 +1,276 @@ +package mrbind_test.mr.cs; + +/** + * A heap-allocated null-terminated string. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_DefaultConstruct()`. + */ + public std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_ConstructFromAnother()`. + */ + public std_string(mrbind_test.mr.cs.std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_string_ConstructFrom()`. + */ + public std_string(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_string_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string, excluding the null-terminator. + * + * Calls `MR_C_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** The contents, decoded as UTF-8. */ + @java.lang.Override public java.lang.String toString() + { + try + { + return mrbind_test.Ffi.string((java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()), (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer())); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java new file mode 100644 index 00000000..2ff2ebcf --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * A non-owning string view. Not necessarily null-terminated. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string_view extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string_view(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string_view::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_view_DefaultConstruct()`. + */ + public std_string_view() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFromAnother()`. + */ + public std_string_view(mrbind_test.mr.cs.std_string_view other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFrom()`. + */ + public std_string_view(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string. + * + * Calls `MR_C_std_string_view_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, NOT necessarily null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string. Not dereferencable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java new file mode 100644 index 00000000..7886ba47 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java @@ -0,0 +1,99 @@ +package mrbind_test.mr.cs; + +/** + * Stores 0 objects. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_DefaultConstruct()`. + */ + public std_tuple() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_ConstructFromAnother()`. + */ + public std_tuple(mrbind_test.mr.cs.std_tuple other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8dc23517 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout`, `const MR::CSharp::ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..cb06928d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &`, `const MR::CSharp::ExposedLayout &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..50d00719 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,131 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &&`, `const MR::CSharp::ExposedLayout &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java new file mode 100644 index 00000000..eca41168 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java @@ -0,0 +1,287 @@ +package mrbind_test.mr.cs; + +/** + * Stores 10 objects: `const int32_t`, `const float`, `int32_t &`, `float &`, `const int32_t &`, `const float &`, `int32_t &&`, `float &&`, `const int32_t &&`, `const float &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * The reference to the parameter `_4` might be preserved in the constructed object. + * The reference to the parameter `_5` might be preserved in the constructed object. + * The reference to the parameter `_6` might be preserved in the constructed object. + * The reference to the parameter `_7` might be preserved in the constructed object. + * The reference to the parameter `_8` might be preserved in the constructed object. + * The reference to the parameter `_9` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + this(__ctor_construct(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(_0, _1, _2, _3, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _4), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _5), _6, _7, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _8), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _9)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t()`. + */ + public int get_const_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float()`. + */ + public float get_const_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int32_t &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 4, of type `const int32_t &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_ref()`. + */ + public int get_const_int32_t_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 5, of type `const float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_ref()`. + */ + public float get_const_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 6, of type `int32_t &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 7, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 8, of type `const int32_t &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_rvalue_ref()`. + */ + public int get_const_int32_t_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 9, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java new file mode 100644 index 00000000..db1d75b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `const int32_t &`, `const float &&`, `const std::string &`, `const std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct()`. + */ + public std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_2, "_2")); + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _0), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _1), __str__2, mrbind_test.Ffi.end(__str__2), __str__3, mrbind_test.Ffi.end(__str__3)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int32_t &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int32_t_ref()`. + */ + public int get_const_int32_t_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int32_t_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `const std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `const std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java new file mode 100644 index 00000000..9d7ce059 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `const int32_t`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int32_t_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int32_t_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int32_t_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_DefaultConstruct()`. + */ + public std_tuple_const_int32_t_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_ConstructFromAnother()`. + */ + public std_tuple_const_int32_t_std_string(mrbind_test.mr.cs.std_tuple_const_int32_t_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int32_t_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_Construct()`. + */ + public std_tuple_const_int32_t_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_get_const_int32_t()`. + */ + public int get_const_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_const_int32_t.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int32_t_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java new file mode 100644 index 00000000..db05e2d4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java @@ -0,0 +1,308 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `float`, `double`, `int32_t`, `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_float_double_int32_t_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_float_double_int32_t_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_float_double_int32_t_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_DefaultConstruct()`. + */ + public std_tuple_float_double_int32_t_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_ConstructFromAnother()`. + */ + public std_tuple_float_double_int32_t_int32_t(mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t other) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_Construct()`. + */ + public std_tuple_float_double_int32_t_int32_t(float _0, double _1, int _2, int _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(float _0, double _1, int _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_Construct.invokeExact(_0, _1, _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_double()`. + */ + public double get_double() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_double.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_double_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_double_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_double_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2()`. + */ + public int get_int32_t_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int32_t`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3()`. + */ + public int get_int32_t_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int32_t`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java new file mode 100644 index 00000000..4cd710c2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.cs; + +/** + * Stores 1 object: `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int32_t_DefaultConstruct()`. + */ + public std_tuple_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_ConstructFromAnother()`. + */ + public std_tuple_int32_t(mrbind_test.mr.cs.std_tuple_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t other) + { + try + { + mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_Construct()`. + */ + public std_tuple_int32_t(int _0) + { + this(__ctor_construct(_0), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_Construct.invokeExact(_0); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_get_int32_t()`. + */ + public int get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_get_int32_t.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int32_t`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java new file mode 100644 index 00000000..30d03896 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int32_t`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int32_t_float_DefaultConstruct()`. + */ + public std_tuple_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_float_ConstructFromAnother()`. + */ + public std_tuple_int32_t_float(mrbind_test.mr.cs.std_tuple_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_float other) + { + try + { + mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_float_Construct()`. + */ + public std_tuple_int32_t_float(int _0, float _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_Construct.invokeExact(_0, _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_float_get_int32_t()`. + */ + public int get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_int32_t.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int32_t`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_float_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_float_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..a300b706 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `int32_t &`, `float &&`, `std::string &`, `std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct.invokeExact(_0, _1, mrbind_test.Ffi.ptrNonNull(_2, "_2"), __str__3, mrbind_test.Ffi.end(__str__3)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * The element 0, of type `int32_t &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int32_t_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int32_t_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java new file mode 100644 index 00000000..f8b1d5ed --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int32_t`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int32_t_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int32_t_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int32_t_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int32_t_std_string_DefaultConstruct()`. + */ + public std_tuple_int32_t_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_std_string_ConstructFromAnother()`. + */ + public std_tuple_int32_t_std_string(mrbind_test.mr.cs.std_tuple_int32_t_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int32_t_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_std_string other) + { + try + { + mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int32_t_std_string_Construct()`. + */ + public std_tuple_int32_t_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int32_t`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_std_string_get_int32_t()`. + */ + public int get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_int32_t.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int32_t`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_std_string_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int32_t_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..623ae858 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_Destroy()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_release.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..8ab46d2f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,216 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `MR::StdUniquePtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at()`. + */ + public mrbind_test.mr.stduniqueptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_DestroyArray()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java new file mode 100644 index 00000000..18dd5bea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int32_t_DefaultConstruct()`. + */ + public std_unique_ptr_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int32_t_ConstructFromAnother()`. + */ + public std_unique_ptr_int32_t(mrbind_test.mr.cs.std_unique_ptr_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int32_t_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int32_t(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_ConstructFrom.invokeExact(other); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int32_t_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_AssignFrom.invokeExact(rawPointer(), other); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int32_t_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_Free()`. + * + * Calls `MR_C_std_unique_ptr_int32_t_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_release.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java new file mode 100644 index 00000000..98bc2054 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `int32_t`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int32_t_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int32_t_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int32_t_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_DefaultConstruct()`. + */ + public std_unique_ptr_int32_t_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_ConstructFromAnother()`. + */ + public std_unique_ptr_int32_t_array(mrbind_test.mr.cs.std_unique_ptr_int32_t_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int32_t_array(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_ConstructFrom.invokeExact(other); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_AssignFrom.invokeExact(rawPointer(), other); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_FreeArray()`. + * + * Calls `MR_C_std_unique_ptr_int32_t_array_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_release.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..7134b6b1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,443 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..908d1623 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..950a30ca --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java new file mode 100644 index 00000000..8dee022c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int32_t_float_DefaultConstruct()`. + */ + public std_unordered_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_ConstructFromAnother()`. + */ + public std_unordered_map_int32_t_float(mrbind_test.mr.cs.std_unordered_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..74f6fb5b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int32_t_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_int32_t_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java new file mode 100644 index 00000000..6d678f49 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int32_t_float_iterator(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..49479696 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,419 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..39ac422a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..591cfc58 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java new file mode 100644 index 00000000..7821141e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java @@ -0,0 +1,416 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_DefaultConstruct()`. + */ + public std_unordered_multimap_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_int32_t_float(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java new file mode 100644 index 00000000..d68fb380 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int32_t_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_int32_t_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java new file mode 100644 index 00000000..ee798622 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int32_t_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..b32f158c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,303 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..b0324811 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,144 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java new file mode 100644 index 00000000..83000d6f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int32_t_DefaultConstruct()`. + */ + public std_unordered_multiset_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int32_t_ConstructFromAnother()`. + */ + public std_unordered_multiset_int32_t(mrbind_test.mr.cs.std_unordered_multiset_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_multiset_int32_t_ConstructFromRange()`. + */ + public std_unordered_multiset_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_multiset_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_int32_t_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int32_t_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java new file mode 100644 index 00000000..77cb209e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_int32_t_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..c7b0a441 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,303 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..3e69169c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,144 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java new file mode 100644 index 00000000..9b350887 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int32_t_DefaultConstruct()`. + */ + public std_unordered_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int32_t_ConstructFromAnother()`. + */ + public std_unordered_set_int32_t(mrbind_test.mr.cs.std_unordered_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t other) + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_set_int32_t_ConstructFromRange()`. + */ + public std_unordered_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int32_t_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java new file mode 100644 index 00000000..78bd5c59 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_int32_t_const_iterator(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java new file mode 100644 index 00000000..b53db503 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java @@ -0,0 +1,303 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 2 objects: `int32_t`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int32_t_float_DefaultConstruct()`. + */ + public std_variant_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_ConstructFromAnother()`. + */ + public std_variant_int32_t_float(mrbind_test.mr.cs.std_variant_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float other) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int32_t_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_ConstructAs_int32_t()`. + */ + public std_variant_int32_t_float(int value) + { + this(__ctor_constructAs_int32_t(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructAs_int32_t.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_ConstructAs_float()`. + */ + public std_variant_int32_t_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_AssignAs_int32_t()`. + */ + public void AssignAs_int32_t(int value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_get_int32_t()`. + */ + public java.lang.Integer get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_int32_t.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java new file mode 100644 index 00000000..b2154844 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java @@ -0,0 +1,383 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int32_t`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int32_t_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int32_t_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int32_t_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int32_t_float_float_DefaultConstruct()`. + */ + public std_variant_int32_t_float_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_float_ConstructFromAnother()`. + */ + public std_variant_int32_t_float_float(mrbind_test.mr.cs.std_variant_int32_t_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_float other) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int32_t_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_float_ConstructAs_int32_t()`. + */ + public std_variant_int32_t_float_float(int value) + { + this(__ctor_constructAs_int32_t(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_int32_t.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_float_ConstructAs_float_1()`. + */ + public static mrbind_test.mr.cs.std_variant_int32_t_float_float constructAs_float_1(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_float_1.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_int32_t_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_float_2.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_float_AssignAs_int32_t()`. + */ + public void AssignAs_int32_t(int value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_float_AssignAs_float_1()`. + */ + public void AssignAs_float_1(float value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_float_1.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_int32_t()`. + */ + public java.lang.Integer get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_int32_t.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_float_1()`. + */ + public java.lang.Float get_float_1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_1.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_float_1_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_1_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_1_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_2.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java new file mode 100644 index 00000000..27f19a45 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java @@ -0,0 +1,399 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int32_t`, `float`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int32_t_float_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int32_t_float_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int32_t_float_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_DefaultConstruct()`. + */ + public std_variant_int32_t_float_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_ConstructFromAnother()`. + */ + public std_variant_int32_t_float_std_string(mrbind_test.mr.cs.std_variant_int32_t_float_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_std_string other) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int32_t_float_std_string_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_ConstructAs_int32_t()`. + */ + public std_variant_int32_t_float_std_string(int value) + { + this(__ctor_constructAs_int32_t(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_int32_t.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_ConstructAs_float()`. + */ + public std_variant_int32_t_float_std_string(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_ConstructAs_std_string()`. + */ + public std_variant_int32_t_float_std_string(java.lang.String value) + { + this(__ctor_constructAs_std_string(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_std_string.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int32_t`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_AssignAs_int32_t()`. + */ + public void AssignAs_int32_t(int value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_int32_t.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_AssignAs_std_string()`. + */ + public void AssignAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_std_string.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_int32_t()`. + */ + public java.lang.Integer get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_int32_t.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int32_t`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int32_t_float_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java new file mode 100644 index 00000000..9afda7e0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java @@ -0,0 +1,362 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `std::monostate`, `int32_t`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_DefaultConstruct.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int32_t_float(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_std_monostate.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int32_t`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_int32_t()`. + */ + public std_variant_std_monostate_int32_t_float(int value) + { + this(__ctor_constructAs_int32_t(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_int32_t.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_float()`. + */ + public std_variant_std_monostate_int32_t_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_std_monostate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int32_t`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_AssignAs_int32_t()`. + */ + public void AssignAs_int32_t(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_std_monostate.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int32_t`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_get_int32_t()`. + */ + public java.lang.Integer get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_int32_t.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int32_t`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java new file mode 100644 index 00000000..708d9b76 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java @@ -0,0 +1,442 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 4 objects: `std::monostate`, `int32_t`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int32_t_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int32_t_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int32_t_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_DefaultConstruct.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int32_t_float_float(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_std_monostate.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int32_t`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_int32_t()`. + */ + public std_variant_std_monostate_int32_t_float_float(int value) + { + this(__ctor_constructAs_int32_t(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_int32_t.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_2.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_3()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float constructAs_float_3(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_3.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_std_monostate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int32_t`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_int32_t()`. + */ + public void AssignAs_int32_t(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_3()`. + */ + public void AssignAs_float_3(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_3.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_std_monostate.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int32_t`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t()`. + */ + public java.lang.Integer get_int32_t() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int32_t`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int32_t_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3()`. + */ + public java.lang.Float get_float_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java new file mode 100644 index 00000000..194d3e16 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java @@ -0,0 +1,825 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_DefaultConstruct()`. + */ + public std_vector_MR_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_ConstructFromAnother()`. + */ + public std_vector_MR_A(mrbind_test.mr.cs.std_vector_MR_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_A_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_A_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_A_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_A_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_A_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_A_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_A_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_A_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at()`. + */ + public mrbind_test.mr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at_mut()`. + */ + public mrbind_test.mr.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front()`. + */ + public mrbind_test.mr.A front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front_mut()`. + */ + public mrbind_test.mr.A front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back()`. + */ + public mrbind_test.mr.A back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back_mut()`. + */ + public mrbind_test.mr.A back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_push_back()`. + */ + public void push_back(mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_A_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert()`. + */ + public void insert(long position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_A_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java new file mode 100644 index 00000000..35b47fb0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_from_mutable()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java new file mode 100644 index 00000000..5b8e6b39 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..9ffda99c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,819 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..f1c34b65 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..8178c424 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..0127f6eb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,920 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange.invokeExact(mrbind_test.Ffi.ptr(ptr), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange()`. + */ + public void assignFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java new file mode 100644 index 00000000..44433f7c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java new file mode 100644 index 00000000..0a46b200 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..78ed9eed --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateA_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateA_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateA value) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateA_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateA_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateA_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at()`. + */ + public mrbind_test.mr.SeparateA at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at_mut()`. + */ + public mrbind_test.mr.SeparateA at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front()`. + */ + public mrbind_test.mr.SeparateA front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front_mut()`. + */ + public mrbind_test.mr.SeparateA front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back()`. + */ + public mrbind_test.mr.SeparateA back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back_mut()`. + */ + public mrbind_test.mr.SeparateA back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateA_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java new file mode 100644 index 00000000..14749229 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java new file mode 100644 index 00000000..4a417afc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..33d851e2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateB value) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at()`. + */ + public mrbind_test.mr.SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front()`. + */ + public mrbind_test.mr.SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back()`. + */ + public mrbind_test.mr.SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..c262d11d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java new file mode 100644 index 00000000..0ec757cc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..18ec7487 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,667 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..67b60de7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..b29f422c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..df40cfb2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert()`. + */ + public void insert(long position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java new file mode 100644 index 00000000..8b6d8009 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java new file mode 100644 index 00000000..ac41c031 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..80c537a1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,819 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..b5728307 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..5aa66f10 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java new file mode 100644 index 00000000..66d211f1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java @@ -0,0 +1,825 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_expected_int32_t_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_expected_int32_t_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_expected_int32_t_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_DefaultConstruct()`. + */ + public std_vector_expected_int32_t_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_ConstructFromAnother()`. + */ + public std_vector_expected_int32_t_std_string(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string other) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.expected_int32_t_std_string value) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_at()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_at_mut()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_front()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_front_mut()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_back()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_back_mut()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.expected_int32_t_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.expected_int32_t_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator position, mrbind_test.mr.cs.expected_int32_t_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator position) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator position, mrbind_test.mr.cs.expected_int32_t_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_begin()`. + */ + public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_end()`. + */ + public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java new file mode 100644 index 00000000..83aeb511 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_expected_int32_t_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_expected_int32_t_std_string_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_expected_int32_t_std_string_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_expected_int32_t_std_string_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_DefaultConstruct()`. + */ + public std_vector_expected_int32_t_std_string_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_ConstructFromAnother()`. + */ + public std_vector_expected_int32_t_std_string_const_iterator(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_from_mutable()`. + */ + public std_vector_expected_int32_t_std_string_const_iterator(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java new file mode 100644 index 00000000..df6d45dd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_expected_int32_t_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_expected_int32_t_std_string_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_expected_int32_t_std_string_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_expected_int32_t_std_string_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_DefaultConstruct()`. + */ + public std_vector_expected_int32_t_std_string_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_ConstructFromAnother()`. + */ + public std_vector_expected_int32_t_std_string_iterator(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator other) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_deref()`. + */ + public mrbind_test.mr.cs.expected_int32_t_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_expected_int32_t_std_string_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java new file mode 100644 index 00000000..3f62e7b7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java @@ -0,0 +1,904 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int32_t_DefaultConstruct()`. + */ + public std_vector_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int32_t_ConstructFromAnother()`. + */ + public std_vector_int32_t(mrbind_test.mr.cs.std_vector_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t other) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_int32_t_ConstructFromRange()`. + */ + public std_vector_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_int32_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_int32_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_int32_t_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_int32_t_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_int32_t_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_int32_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int32_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int32_t_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int32_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int32_t_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_int32_t_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int32_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_int32_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_begin()`. + */ + public mrbind_test.mr.cs.std_vector_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int32_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int32_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_end()`. + */ + public mrbind_test.mr.cs.std_vector_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int32_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int32_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_int32_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_int32_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_int32_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java new file mode 100644 index 00000000..c287a1d8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_DefaultConstruct()`. + */ + public std_vector_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_ConstructFromAnother()`. + */ + public std_vector_int32_t_const_iterator(mrbind_test.mr.cs.std_vector_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_from_mutable()`. + */ + public std_vector_int32_t_const_iterator(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int32_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java new file mode 100644 index 00000000..b93fbf1d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int32_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int32_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int32_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int32_t_iterator_DefaultConstruct()`. + */ + public std_vector_int32_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int32_t_iterator_ConstructFromAnother()`. + */ + public std_vector_int32_t_iterator(mrbind_test.mr.cs.std_vector_int32_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int32_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int32_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int32_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_int32_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_int32_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int32_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java new file mode 100644 index 00000000..f919110b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java @@ -0,0 +1,904 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_DefaultConstruct()`. + */ + public std_vector_int64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_ConstructFromAnother()`. + */ + public std_vector_int64_t(mrbind_test.mr.cs.std_vector_int64_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_int64_t_ConstructFromRange()`. + */ + public std_vector_int64_t(java.lang.Long ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_int64_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_int64_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_int64_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_int64_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_int64_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_int64_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_int64_t_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_int64_t_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_int64_t_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_int64_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int64_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int64_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int64_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_begin()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int64_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int64_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_end()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_int64_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_int64_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_int64_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_int64_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java new file mode 100644 index 00000000..ac401e7e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_int64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_DefaultConstruct()`. + */ + public std_vector_int64_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother()`. + */ + public std_vector_int64_t_const_iterator(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_from_mutable()`. + */ + public std_vector_int64_t_const_iterator(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java new file mode 100644 index 00000000..c44aa941 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_int64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_iterator_DefaultConstruct()`. + */ + public std_vector_int64_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_iterator_ConstructFromAnother()`. + */ + public std_vector_int64_t_iterator(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_int64_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_int64_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int64_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..eea77f4b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB value) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..03bd84d1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java new file mode 100644 index 00000000..21443de0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java new file mode 100644 index 00000000..2307be69 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java @@ -0,0 +1,904 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_DefaultConstruct()`. + */ + public std_vector_uint64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_ConstructFromAnother()`. + */ + public std_vector_uint64_t(mrbind_test.mr.cs.std_vector_uint64_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_uint64_t_ConstructFromRange()`. + */ + public std_vector_uint64_t(java.lang.Long ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_uint64_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_uint64_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_uint64_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_uint64_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_uint64_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_uint64_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_uint64_t_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_uint64_t_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_uint64_t_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_uint64_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_uint64_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_uint64_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_uint64_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_begin()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_end()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_uint64_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_uint64_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java new file mode 100644 index 00000000..661defbf --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_uint64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct()`. + */ + public std_vector_uint64_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother()`. + */ + public std_vector_uint64_t_const_iterator(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_from_mutable()`. + */ + public std_vector_uint64_t_const_iterator(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java new file mode 100644 index 00000000..73cd8bc8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_uint64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_iterator_DefaultConstruct()`. + */ + public std_vector_uint64_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_iterator_ConstructFromAnother()`. + */ + public std_vector_uint64_t_iterator(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_uint64_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_uint64_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_uint64_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java new file mode 100644 index 00000000..727cbe82 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::A`. + * Derived classes: + * Virtual: + * `MR::CSharp::C` + * Direct: (non-virtual) + * `MR::CSharp::B` + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.csharp.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.A assignFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::foo`. + * + * Calls `MR_CSharp_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::bar`. + * + * Calls `MR_CSharp_A_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::static_foo`. + * + * Calls `MR_CSharp_A_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::static_bar`. + * + * Calls `MR_CSharp_A_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_foo`. + * + * Calls `MR_CSharp_A_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_bar`. + * + * Calls `MR_CSharp_A_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::refs`. + * + * Calls `MR_CSharp_A_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java new file mode 100644 index 00000000..07a137bb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java @@ -0,0 +1,250 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::AmbiguousTemplates`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class AmbiguousTemplates extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public AmbiguousTemplates(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? AmbiguousTemplates::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_AmbiguousTemplates_DefaultConstruct()`. + */ + public AmbiguousTemplates() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::AmbiguousTemplates::AmbiguousTemplates`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_AmbiguousTemplates_ConstructFromAnother()`. + */ + public AmbiguousTemplates(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_AmbiguousTemplates_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.AmbiguousTemplates assignFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.AmbiguousTemplates(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_int32_t()`. + */ + public void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_int32_t.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_float()`. + */ + public void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_float.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_int32_t()`. + */ + public int template_b_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_float()`. + */ + public float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_float.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_int32_t()`. + */ + public void template_c_int32_t() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_int32_t.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_float()`. + */ + public void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_float.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::instantiate`. + * + * Calls `MR_CSharp_AmbiguousTemplates_instantiate()`. + */ + public void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_instantiate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java new file mode 100644 index 00000000..4a0fa1c5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,465 @@ +package mrbind_test.mr.csharp; + +/** + * Test various array members. + * Generated from class `MR::CSharp::ArrayMembers`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ArrayMembers extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ArrayMembers(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ArrayMembers::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ArrayMembers_DefaultConstruct()`. + */ + public ArrayMembers() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ArrayMembers::ArrayMembers`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ArrayMembers_ConstructFromAnother()`. + */ + public ArrayMembers(mrbind_test.mr.csharp.ArrayMembers _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ArrayMembers _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * The reference to the parameter `value` might be preserved in this object in element `i`. + * + * Calls `MR_CSharp_ArrayMembers_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ia()`. + */ + public int ia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ia()`. + */ + public static long iaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `iaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_iaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment iaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `iaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_iaa()`. + */ + public static long iaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ci`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ci()`. + */ + public int ci() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cia()`. + */ + public int cia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `cia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_cia()`. + */ + public static long ciaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ciaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ciaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ciaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ciaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ciaa()`. + */ + public static long ciaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_ArrayMembers_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `sa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_sa()`. + */ + public mrbind_test.mr.cs.std_string sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `sa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_sa()`. + */ + public static long saSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * std::string saa[3][4]; // The C generator doesn't support those yet. We'd need to expose them as flat arrays, with N size getters, I think? + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cs`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cs()`. + */ + public mrbind_test.mr.cs.std_string cs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `csa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_csa()`. + */ + public mrbind_test.mr.cs.std_string csa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `csa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_csa()`. + */ + public static long csaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java new file mode 100644 index 00000000..1389e0ad --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,127 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.csharp.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * + * Calls `MR_CSharp_B_Construct()`. + */ + public B(int a, int b) + { + this(__ctor_construct(a, b), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int a, int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Construct.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_B_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java new file mode 100644 index 00000000..99345e51 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::C`. + * Base classes: + * Virtual: + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.csharp.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_C_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java new file mode 100644 index 00000000..906ddba0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Test the call operator, since it can have an unusual amount of arguments. + * Not testing `[]` here to be able to run the tests on older C++. + * Generated from class `MR::CSharp::CallOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CallOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CallOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CallOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_CallOp_DefaultConstruct()`. + */ + public CallOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::CallOp::CallOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_CallOp_ConstructFromAnother()`. + */ + public CallOp(mrbind_test.mr.csharp.CallOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_CallOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.CallOp assignFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.CallOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_0()`. + */ + public void call_0() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_call_0.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_3()`. + */ + public int call_3(int _1, int _2, int _3) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_call_3.invokeExact(rawPointer(), _1, _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java new file mode 100644 index 00000000..7aa25fe8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,324 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersBool`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersBool extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersBool::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersBool::ClassMemberPointersBool`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFromAnother()`. + */ + public ClassMemberPointersBool(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersBool` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sb()`. + */ + public static void setSb(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sd()`. + */ + public static boolean sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_b()`. + */ + public void setB(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_d()`. + */ + public boolean d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java new file mode 100644 index 00000000..3908e24d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,346 @@ +package mrbind_test.mr.csharp; + +/** + * Class fields of pointer types: + * Generated from class `MR::CSharp::ClassMemberPointersClass`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersClass extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersClass(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersClass::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersClass::ClassMemberPointersClass`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFromAnother()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersClass` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFrom()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sc()`. + */ + public static mrbind_test.mr.csharp.A sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sd()`. + */ + public static mrbind_test.mr.csharp.A sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_c()`. + */ + public mrbind_test.mr.csharp.A c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_d()`. + */ + public mrbind_test.mr.csharp.A d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java new file mode 100644 index 00000000..ab22a094 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,345 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersExposed`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersExposed extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersExposed(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersExposed::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersExposed::ClassMemberPointersExposed`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersExposed` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFrom()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sc()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sd()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_c()`. + */ + public mrbind_test.mr.csharp.ExposedLayout c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_d()`. + */ + public mrbind_test.mr.csharp.ExposedLayout d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java new file mode 100644 index 00000000..371acc5f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,324 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersUshort`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersUshort extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersUshort::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersUshort::ClassMemberPointersUshort`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother()`. + */ + public ClassMemberPointersUshort(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersUshort` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, d)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sb()`. + */ + public static void setSb(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sd()`. + */ + public static short sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_b()`. + */ + public void setB(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_d()`. + */ + public short d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java new file mode 100644 index 00000000..9314e05a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java @@ -0,0 +1,246 @@ +package mrbind_test.mr.csharp; + +/** + * Test that we don't produce the const and non-const overloads of the same function under the same name in C#, as that would be a compilation error in C#. + * Generated from class `MR::CSharp::ConstNonconstConflicts`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConstNonconstConflicts extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConstNonconstConflicts");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConstNonconstConflicts(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConstNonconstConflicts copy() {return new ConstNonconstConflicts(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConstNonconstConflicts other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_int32_t()`. + */ + public void foo(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_int32_t.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_float()`. + */ + public void foo(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_float.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_char()`. + */ + public void foo_mut_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_char.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_char()`. + */ + public void foo_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_char.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_const_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int32_t()`. + */ + public int opDiv_ref_int32_t(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int32_t()`. + */ + public int opDiv_const_ref_int32_t(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ConstNonconstConflicts() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java new file mode 100644 index 00000000..0964e46f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion constructors. Right now we only provide conversion operators for implicit ones, + * because I have no idea when the explicit ones could be useful. + * Generated from class `MR::CSharp::ConvCtor`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtor extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtor(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtor::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtor_DefaultConstruct()`. + */ + public ConvCtor() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtor_ConstructFromAnother()`. + */ + public ConvCtor(mrbind_test.mr.csharp.ConvCtor _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_int32_t()`. + */ + public ConvCtor(int _1) + { + this(__ctor_construct_1_int32_t(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_int32_t(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_int32_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_int32_t()`. + */ + public ConvCtor(int _1, int _2) + { + this(__ctor_construct_2_int32_t(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_int32_t(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int32_t.invokeExact(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_int16_t()`. + */ + public ConvCtor(short _1, java.lang.Integer _2) + { + this(__ctor_construct_2_int16_t(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_int16_t(short _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int16_t.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_float()`. + */ + public ConvCtor(float _1) + { + this(__ctor_construct_1_float(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_float(float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_float.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_float()`. + */ + public ConvCtor(float _1, float _2) + { + this(__ctor_construct_2_float(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_float(float _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_float.invokeExact(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtor::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtor_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtor assignFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtor(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java new file mode 100644 index 00000000..b65cebe5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * A sad class that's copyable but not movable. + * This can often happen if you have a user-provided destructor. + * Generated from class `MR::CSharp::ConvCtorCopyButNoMove`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorCopyButNoMove extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorCopyButNoMove(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorCopyButNoMove::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother()`. + */ + public ConvCtorCopyButNoMove(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_Construct()`. + */ + public ConvCtorCopyButNoMove(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorCopyButNoMove::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorCopyButNoMove assignFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorCopyButNoMove(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java new file mode 100644 index 00000000..c7ccbd7e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java @@ -0,0 +1,54 @@ +package mrbind_test.mr.csharp; + +/** + * A converting ctor in an exposed struct. + * Generated from class `MR::CSharp::ConvCtorExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConvCtorExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConvCtorExposed copy() {return new ConvCtorExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConvCtorExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from constructor `MR::CSharp::ConvCtorExposed::ConvCtorExposed`. + * + * Calls `MR_CSharp_ConvCtorExposed_Construct()`. + */ + public ConvCtorExposed(int _1) + { + super(__ctor_construct(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorExposed_Construct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public ConvCtorExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java new file mode 100644 index 00000000..692b6556 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a non-trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorNonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_DefaultConstruct()`. + */ + public ConvCtorNonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother()`. + */ + public ConvCtorNonTrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_Construct()`. + */ + public ConvCtorNonTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java new file mode 100644 index 00000000..ef295dcd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * A non-trivial move-only class with a converting ctor. + * Here we test that our converting constructors injected into `_ByValue_...` don't attempt to copy the class. + * Generated from class `MR::CSharp::ConvCtorNonTrivialRestricted`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivialRestricted extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivialRestricted(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivialRestricted::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother()`. + */ + public ConvCtorNonTrivialRestricted(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_Construct()`. + */ + public ConvCtorNonTrivialRestricted(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivialRestricted::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java new file mode 100644 index 00000000..d3800440 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorTrivial_DefaultConstruct()`. + */ + public ConvCtorTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorTrivial_ConstructFromAnother()`. + */ + public ConvCtorTrivial(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * + * Calls `MR_CSharp_ConvCtorTrivial_Construct()`. + */ + public ConvCtorTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java new file mode 100644 index 00000000..08c38364 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Test that the default argument of the parameter of a converting constructor is stripped when rewriting it as a conversion operator. + * Generated from class `MR::CSharp::ConvCtorWithDefArg`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorWithDefArg extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorWithDefArg(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorWithDefArg::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_Construct()`. + */ + public ConvCtorWithDefArg(java.lang.Integer _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Construct.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother()`. + */ + public ConvCtorWithDefArg(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorWithDefArg::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorWithDefArg assignFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorWithDefArg(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java new file mode 100644 index 00000000..4091347e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators. We preserve explicit-ness. + * Generated from class `MR::CSharp::ConvOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOp_DefaultConstruct()`. + */ + public ConvOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOp::ConvOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOp_ConstructFromAnother()`. + */ + public ConvOp(mrbind_test.mr.csharp.ConvOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator int32_t`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_int32_t()`. + */ + public int convertTo_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator float`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_float()`. + */ + public float convertTo_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_float.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOp assignFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java new file mode 100644 index 00000000..a3582600 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators to references. + * Generated from class `MR::CSharp::ConvOpToRef`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOpToRef extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOpToRef(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOpToRef::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOpToRef_DefaultConstruct()`. + */ + public ConvOpToRef() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOpToRef::ConvOpToRef`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOpToRef_ConstructFromAnother()`. + */ + public ConvOpToRef(mrbind_test.mr.csharp.ConvOpToRef _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not to a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator int32_t`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_int32_t()`. + */ + public int convertTo_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator float &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_float_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference, explicit. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator uint16_t &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_uint16_t_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_uint16_t_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_uint16_t_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOpToRef::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOpToRef_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOpToRef assignFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOpToRef(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java new file mode 100644 index 00000000..ac0228af --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java @@ -0,0 +1,147 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::D`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.csharp.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_D_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.D assignFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::d1`. + * + * Calls `MR_CSharp_D_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::D::d2`. + * + * Calls `MR_CSharp_D_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java new file mode 100644 index 00000000..e39d8ef6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::E`. + * Derived classes: + * Virtual: + * `MR::CSharp::G` + * Direct: (non-virtual) + * `MR::CSharp::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.csharp.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_E_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.E assignFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::e1`. + * + * Calls `MR_CSharp_E_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::E::e2`. + * + * Calls `MR_CSharp_E_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E1.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E1.java new file mode 100644 index 00000000..a25ccc05 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E1.java @@ -0,0 +1,45 @@ +package mrbind_test.mr.csharp; + +/** + * Enum comment. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E1 +{ + public final int value; + + public E1(int value) {this.value = value;} + + /** + * A + */ + public static final E1 a = new E1(10); + /** + * B + */ + public static final E1 b = new E1(20); + /** + * C + */ + public static final E1 c = new E1(30); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E1 of(int value) + { + if (value == a.value) return a; + if (value == b.value) return b; + if (value == c.value) return c; + return new E1(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E1 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + if (value == c.value) return "c"; + return "E1(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E2.java new file mode 100644 index 00000000..06d50b54 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E2.java @@ -0,0 +1,34 @@ +package mrbind_test.mr.csharp; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final boolean value; + + public E2(boolean value) {this.value = value;} + + /** + * < Test a same-line documentation comment. Add some >weird< & 'characters". + */ + public static final E2 a = new E2(false); + public static final E2 b = new E2(true); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(boolean value) + { + if (value == a.value) return a; + if (value == b.value) return b; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return value ? 1 : 0;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java new file mode 100644 index 00000000..99b0c276 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.csharp; + +/** + * Test equality comparison. + * Generated from class `MR::CSharp::EqualityA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityA_DefaultConstruct()`. + */ + public EqualityA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityA::EqualityA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityA_ConstructFromAnother()`. + */ + public EqualityA(mrbind_test.mr.csharp.EqualityA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityA assignFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA_int32_t()`. + */ + public boolean opEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityA_int32_t()`. + */ + public boolean opNotEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityA_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java new file mode 100644 index 00000000..78f44b7e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.csharp; + +/** + * Return type isn't `bool`. + * Generated from class `MR::CSharp::EqualityB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityB_DefaultConstruct()`. + */ + public EqualityB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityB::EqualityB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityB_ConstructFromAnother()`. + */ + public EqualityB(mrbind_test.mr.csharp.EqualityB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityB assignFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB_int32_t()`. + */ + public int opEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityB_int32_t()`. + */ + public int opNotEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityB_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB()`. + */ + public int opEqual(mrbind_test.mr.csharp.EqualityB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java new file mode 100644 index 00000000..5baf4031 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.csharp; + +/** + * Return type is `void`. + * Generated from class `MR::CSharp::EqualityC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityC_DefaultConstruct()`. + */ + public EqualityC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityC::EqualityC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityC_ConstructFromAnother()`. + */ + public EqualityC(mrbind_test.mr.csharp.EqualityC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityC assignFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC_int32_t()`. + */ + public void opEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC_int32_t.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityC_int32_t()`. + */ + public void opNotEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityC_int32_t.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC()`. + */ + public void opEqual(mrbind_test.mr.csharp.EqualityC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java new file mode 100644 index 00000000..cc0e5ffe --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and isn't a managed type. + * Generated from class `MR::CSharp::EqualityD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityD_DefaultConstruct()`. + */ + public EqualityD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityD::EqualityD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityD_ConstructFromAnother()`. + */ + public EqualityD(mrbind_test.mr.csharp.EqualityD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityD assignFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityD_const_int32_t_ptr()`. + */ + public boolean opEqual(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityD_const_int32_t_ptr.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java new file mode 100644 index 00000000..71c9a91a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and is a managed type. + * Generated from class `MR::CSharp::EqualityE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityE_DefaultConstruct()`. + */ + public EqualityE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityE::EqualityE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityE_ConstructFromAnother()`. + */ + public EqualityE(mrbind_test.mr.csharp.EqualityE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityE assignFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityD _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(_1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java new file mode 100644 index 00000000..0b8f1c8b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.csharp; + +/** + * Exposed structs: + * Generated from class `MR::CSharp::ExposedLayout`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayout extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayout");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayout(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayout copy() {return new ExposedLayout(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayout other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayout::foo`. + * + * Calls `MR_CSharp_ExposedLayout_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::bar`. + * + * Calls `MR_CSharp_ExposedLayout_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::blah`. + * + * Calls `MR_CSharp_ExposedLayout_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayout::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayout()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayout_ref_int32_t()`. + */ + public int opAdd_ref_int32_t(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayout_ref_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Test how returning references to an exposed struct works, since C# overloaded operators can't return `ref`. + * Note that this operator must be `const` to test this correctly, since we turn non-const operators in exposed structs into functions. + * Generated from method `MR::CSharp::ExposedLayout::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayout_int32_t()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opMul(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayout_int32_t.invokeExact(rawPointer(), _1); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_const_MR_CSharp_ExposedLayout_ref_int32_t()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opAdd_const_ref_int32_t(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_const_MR_CSharp_ExposedLayout_ref_int32_t.invokeExact(rawPointer(), _1); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayout_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayout_float.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout_char.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ExposedLayout() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java new file mode 100644 index 00000000..9ff0610e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -0,0 +1,82 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ExposedLayoutB`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutB extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutB");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutB(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutB copy() {return new ExposedLayoutB(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutB other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Some random ctor. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_2()`. + */ + public ExposedLayoutB(int _1, int _2) + { + super(__ctor_construct_2(_1, _2), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_2.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This gets a lifetime annotation from `--infer-lifetime-constructors`, but it should be a no-op in an exposed struct. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_1()`. + */ + public ExposedLayoutB(mrbind_test.mr.csharp.A _1) + { + super(__ctor_construct_1(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr.csharp.A _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutB() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutC.java new file mode 100644 index 00000000..6f97ef2f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutC.java @@ -0,0 +1,31 @@ +package mrbind_test.mr.csharp; + +/** + * Just a simple exposed struct to test other things. + * Generated from class `MR::CSharp::ExposedLayoutC`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutC extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutC");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutC(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutC copy() {return new ExposedLayoutC(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutC other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public ExposedLayoutC() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java new file mode 100644 index 00000000..c45a729c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -0,0 +1,294 @@ +package mrbind_test.mr.csharp; + +/** + * This one is backed by a shared pointer. + * Generated from class `MR::CSharp::ExposedLayoutSh`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutSh extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayoutSh");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutSh(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutSh copy() {return new ExposedLayoutSh(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutSh other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::foo`. + * + * Calls `MR_CSharp_ExposedLayoutSh_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::bar`. + * + * Calls `MR_CSharp_ExposedLayoutSh_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::blah`. + * + * Calls `MR_CSharp_ExposedLayoutSh_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayoutSh()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayoutSh_int32_t()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayoutSh_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayoutSh_int32_t()`. + */ + public int opMul(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayoutSh_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh_float.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayoutSh_char.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * While we're at it, test comparison against another exposed struct, since this is apparently non-trivial. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And against itself, too. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutSh() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java new file mode 100644 index 00000000..6b1de988 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * `MR::CSharp::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.csharp.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_F_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java new file mode 100644 index 00000000..f8d831c4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7101 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CSharp::foo`. + * + * Calls `MR_CSharp_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int`. + * + * Calls `MR_CSharp_test_int()`. + */ + public static int test_int(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Marking this `noexcept` for testing. + * Generated from function `MR::CSharp::test_bool`. + * + * Calls `MR_CSharp_test_bool()`. + */ + public static boolean test_bool(boolean a, java.lang.Boolean b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref`. + * + * Calls `MR_CSharp_test_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void test_bool_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref.invokeExact(a, b); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref2`. + * + * Calls `MR_CSharp_test_bool_ref2()`. Some types are raw C types, see the C bindings for the details. + */ + public static int test_bool_ref2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_bool_ref`. + * + * Calls `MR_CSharp_get_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment get_bool_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_get_bool_ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::print_bool_ref`. + * + * Calls `MR_CSharp_print_bool_ref()`. + */ + public static void print_bool_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_print_bool_ref.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_cref`. + * + * Calls `MR_CSharp_test_bool_cref()`. + */ + public static boolean test_bool_cref(boolean _1, java.lang.Boolean _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _1), (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _2))); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ref`. + * + * Calls `MR_CSharp_test_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cref`. + * + * Calls `MR_CSharp_test_int_cref()`. + */ + public static int test_int_cref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_rref`. + * + * Calls `MR_CSharp_test_int_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_crref`. + * + * Calls `MR_CSharp_test_int_crref()`. + */ + public static int test_int_crref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ptr`. + * + * Calls `MR_CSharp_test_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cptr`. + * + * Calls `MR_CSharp_test_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Integer test_int_cptr(java.lang.Integer a, java.lang.Integer b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b)), c); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort`. + * + * Calls `MR_CSharp_test_ushort()`. + */ + public static short test_ushort(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + short __ret = (short)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ref`. + * + * Calls `MR_CSharp_test_ushort_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cref`. + * + * Calls `MR_CSharp_test_ushort_cref()`. + */ + public static short test_ushort_cref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_rref`. + * + * Calls `MR_CSharp_test_ushort_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_crref`. + * + * Calls `MR_CSharp_test_ushort_crref()`. + */ + public static short test_ushort_crref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ptr`. + * + * Calls `MR_CSharp_test_ushort_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cptr`. + * + * Calls `MR_CSharp_test_ushort_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Short test_ushort_cptr(java.lang.Short a, java.lang.Short b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c); + return __ret.address() == 0 ? null : (java.lang.Short)__ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_int`. + * + * Calls `MR_CSharp_test_constness_int()`. + */ + public static int test_constness_int(int _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_int.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_str`. + * + * Calls `MR_CSharp_test_constness_str()`. + */ + public static mrbind_test.mr.cs.std_string test_constness_str(java.lang.String _1, java.lang.String _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, _2); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_str.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1), __str__2, mrbind_test.Ffi.end(__str__2)); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how we adjust keywords in parameter names. + * \param params blah + * @param params blah + * `params` 'params' "params" params huhparams paramshuh \p params \c params @p params @c params \A params @A params + * In this comment, only quoted and `\param ...` uses are adjusted, and not standalone occurences of the word (even if it's a separate word, let alone if it's just a part of a word). + * `\c ...` and `\p ...` are handled, but unknown tags like `\A ...` are not. + * This is also handled, naturally, because we handle quotes. + * Generated from function `MR::CSharp::test_keyword_in_param_name`. + * + * Calls `MR_CSharp_test_keyword_in_param_name()`. + */ + public static void test_keyword_in_param_name(int params) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_keyword_in_param_name.invokeExact(params); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E1.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E1.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E1.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_crref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E1_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cptr(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value)), c); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E2.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_crref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cptr(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value)), c); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial`. + * + * Calls `MR_CSharp_test_class_trivial()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ref`. + * + * Calls `MR_CSharp_test_class_trivial_ref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cref`. + * + * Calls `MR_CSharp_test_class_trivial_cref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_rref`. + * + * Calls `MR_CSharp_test_class_trivial_rref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_rref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_crref`. + * + * Calls `MR_CSharp_test_class_trivial_crref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_crref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ptr`. + * + * Calls `MR_CSharp_test_class_trivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cptr`. + * + * Calls `MR_CSharp_test_class_trivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial`. + * + * Calls `MR_CSharp_test_class_nontrivial()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ref`. + * + * Calls `MR_CSharp_test_class_nontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cref`. + * + * Calls `MR_CSharp_test_class_nontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_rref`. + * + * Calls `MR_CSharp_test_class_nontrivial_rref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_rref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_crref`. + * + * Calls `MR_CSharp_test_class_nontrivial_crref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_crref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_void_ptr`. + * + * Calls `MR_CSharp_test_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_void_cptr`. + * + * Calls `MR_CSharp_test_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::mark_se_as_shared`. + * + * Calls `MR_CSharp_mark_se_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE mark_se_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_se_as_shared.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Poking a shared pointer type for a single class causes `std::shared_ptr` to be instantiated for the entire hierarchy (when `--bind-shared-ptr-virally`, which is required for `C#`). + * Generated from function `MR::CSharp::test_shptr`. + * + * Calls `MR_CSharp_test_shptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ref`. + * + * Calls `MR_CSharp_test_shptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cref`. + * + * Calls `MR_CSharp_test_shptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_rref`. + * + * Calls `MR_CSharp_test_shptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_rref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_crref`. + * + * Calls `MR_CSharp_test_shptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_crref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ptr`. + * + * Calls `MR_CSharp_test_shptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cptr`. + * + * Calls `MR_CSharp_test_shptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr`. + * + * Calls `MR_CSharp_test_shcptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ref`. + * + * Calls `MR_CSharp_test_shcptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cref`. + * + * Calls `MR_CSharp_test_shcptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_rref`. + * + * Calls `MR_CSharp_test_shcptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_rref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_crref`. + * + * Calls `MR_CSharp_test_shcptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_crref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ptr`. + * + * Calls `MR_CSharp_test_shcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cptr`. + * + * Calls `MR_CSharp_test_shcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::mark_sg_as_shared`. + * + * Calls `MR_CSharp_mark_sg_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG mark_sg_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_sg_as_shared.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string`. + * + * Calls `MR_CSharp_test_string()`. + */ + public static mrbind_test.mr.cs.std_string test_string(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ref`. + * + * Calls `MR_CSharp_test_string_ref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_ref(mrbind_test.mr.cs.std_string a, mrbind_test.mr.cs.std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cref`. + * + * Calls `MR_CSharp_test_string_cref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_rref`. + * + * Calls `MR_CSharp_test_string_rref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_crref`. + * + * Calls `MR_CSharp_test_string_crref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ptr`. + * + * Calls `MR_CSharp_test_string_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_ptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cptr`. + * + * Calls `MR_CSharp_test_string_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_cptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview`. + * + * Calls `MR_CSharp_test_stringview()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ref`. + * + * Calls `MR_CSharp_test_stringview_ref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ref(mrbind_test.mr.cs.std_string_view a, mrbind_test.mr.cs.std_string_view b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cref`. + * + * Calls `MR_CSharp_test_stringview_cref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_rref`. + * + * Calls `MR_CSharp_test_stringview_rref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_crref`. + * + * Calls `MR_CSharp_test_stringview_crref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ptr`. + * + * Calls `MR_CSharp_test_stringview_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cptr`. + * + * Calls `MR_CSharp_test_stringview_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath`. + * + * Calls `MR_CSharp_test_fspath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ref`. + * + * Calls `MR_CSharp_test_fspath_ref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ref(mrbind_test.mr.cs.std_filesystem_path a, mrbind_test.mr.cs.std_filesystem_path b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cref`. + * + * Calls `MR_CSharp_test_fspath_cref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_rref`. + * + * Calls `MR_CSharp_test_fspath_rref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_crref`. + * + * Calls `MR_CSharp_test_fspath_crref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ptr`. + * + * Calls `MR_CSharp_test_fspath_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cptr`. + * + * Calls `MR_CSharp_test_fspath_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsA_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsA _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsA_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsB_int32_t()`. + */ + public static void opAdd(mrbind_test.mr.csharp.StaticOpsLhsB _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsB_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsC_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsC _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsC_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_1, "_1").release(), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsD_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsD _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsD_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsE_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsE _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsE_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsF_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsF _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsF_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsG_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsG _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsG_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsH_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsH _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsH_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsA()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsA _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsA.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsB()`. + */ + public static void opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsB _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsB.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsC()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsC _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsC.invokeExact(_1, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_2, "_2").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsD()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsD _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsD.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsE()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsE _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsE.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsF()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsF _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsF.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsG()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsG _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsG.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_StaticOpsRhsH()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsH _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsH.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Fails to inject, becomes a free function. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsEnum_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsEnum _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsEnum_int32_t.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Gets injected into the lhs by default. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsMixedLhs _1, mrbind_test.mr.csharp.StaticOpsMixedRhs _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_float()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonTrivialClassOps _1, float _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonTrivialClassOps_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_float_MR_CSharp_NonTrivialClassOps()`. + */ + public static int opAdd(float _1, mrbind_test.mr.csharp.NonTrivialClassOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_float_MR_CSharp_NonTrivialClassOps.invokeExact(_1, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int32_t()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonCopyableClassByValueOps _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int32_t_MR_CSharp_NonCopyableClassByValueOps()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.NonCopyableClassByValueOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_NonCopyableClassByValueOps.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial`. + * + * Calls `MR_CSharp_test_class_convtrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ref`. + * + * Calls `MR_CSharp_test_class_convtrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cref`. + * + * Calls `MR_CSharp_test_class_convtrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial`. + * + * Calls `MR_CSharp_test_class_convnontrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int32_t_MR_CSharp_ExposedLayout()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int32_t_MR_CSharp_ExposedLayout()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int32_t_MR_CSharp_ExposedLayout()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayout()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayout.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ExposedLayout(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_rref`. + * + * Calls `MR_CSharp_test_exposed_rref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_rref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_crref`. + * + * Calls `MR_CSharp_test_exposed_crref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_crref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * This broke at one point, so testing it too. + * Generated from function `MR::CSharp::test_exposed_vec`. + * + * Calls `MR_CSharp_test_exposed_vec()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout test_exposed_vec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_vec.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test that capturing lifetime of an exposed struct is a no-op. + * Generated from function `MR::CSharp::asave_ref_in_exposed_layout`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_asave_ref_in_exposed_layout()`. + */ + public static mrbind_test.mr.csharp.NonTrivial asave_ref_in_exposed_layout(mrbind_test.mr.csharp.ExposedLayout ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_asave_ref_in_exposed_layout.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int32_t_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int32_t_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int32_t_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayoutSh()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::make_exposed_sh`. + * + * Calls `MR_CSharp_make_exposed_sh()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh make_exposed_sh() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_make_exposed_sh.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * And try an equality comparison! + * Generated from function `MR::CSharp::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutB()`. + */ + public static boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutB _1, mrbind_test.mr.csharp.ExposedLayoutB _2) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_C_equal_MR_CSharp_ExposedLayoutB.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_optint`. + * + * Calls `MR_CSharp_test_optint()`. + */ + public static mrbind_test.mr.cs.std_optional_int32_t test_optint(int a, mrbind_test.mr.cs.std_optional_int32_t b, mrbind_test.mr.cs.std_optional_int32_t c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ref`. + * + * Calls `MR_CSharp_test_optint_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_int32_t test_optint_ref(mrbind_test.mr.cs.std_optional_int32_t a, mrbind_test.mr.cs.std_optional_int32_t b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cref`. + * + * Calls `MR_CSharp_test_optint_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_int32_t test_optint_cref(int a, mrbind_test.mr.cs.std_optional_int32_t b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ptr`. + * + * Calls `MR_CSharp_test_optint_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int32_t test_optint_ptr(mrbind_test.mr.cs.std_optional_int32_t a, mrbind_test.mr.cs.std_optional_int32_t b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cptr`. + * + * Calls `MR_CSharp_test_optint_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int32_t test_optint_cptr(mrbind_test.mr.cs.std_optional_int32_t a, mrbind_test.mr.cs.std_optional_int32_t b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr`. + * + * Calls `MR_CSharp_test_optstr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b, mrbind_test.mr.cs.std_optional_std_string c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ref`. + * + * Calls `MR_CSharp_test_optstr_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ref(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cref`. + * + * Calls `MR_CSharp_test_optstr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cref.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ptr`. + * + * Calls `MR_CSharp_test_optstr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cptr`. + * + * Calls `MR_CSharp_test_optstr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv`. + * + * Calls `MR_CSharp_test_opttriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ref`. + * + * Calls `MR_CSharp_test_opttriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cref`. + * + * Calls `MR_CSharp_test_opttriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ptr`. + * + * Calls `MR_CSharp_test_opttriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cptr`. + * + * Calls `MR_CSharp_test_opttriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv`. + * + * Calls `MR_CSharp_test_optnontriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, mrbind_test.mr.csharp.NonTrivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ref`. + * + * Calls `MR_CSharp_test_optnontriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cref`. + * + * Calls `MR_CSharp_test_optnontriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cref.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ptr`. + * + * Calls `MR_CSharp_test_optnontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cptr`. + * + * Calls `MR_CSharp_test_optnontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp`. + * + * Calls `MR_CSharp_test_optshexp()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ref`. + * + * Calls `MR_CSharp_test_optshexp_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cref`. + * + * Calls `MR_CSharp_test_optshexp_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ptr`. + * + * Calls `MR_CSharp_test_optshexp_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cptr`. + * + * Calls `MR_CSharp_test_optshexp_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv`. + * + * Calls `MR_CSharp_test_optshtriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, mrbind_test.mr.cs.std_optional_MR_CSharp_SA c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ref`. + * + * Calls `MR_CSharp_test_optshtriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cref`. + * + * Calls `MR_CSharp_test_optshtriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cref(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ptr`. + * + * Calls `MR_CSharp_test_optshtriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cptr`. + * + * Calls `MR_CSharp_test_optshtriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Tag types: + * Generated from function `MR::CSharp::test_tag`. + * + * Calls `MR_CSharp_test_tag()`. + */ + public static void test_tag() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cref`. + * + * Calls `MR_CSharp_test_tag_cref()`. + */ + public static void test_tag_cref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cref.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_ptr`. + * + * Calls `MR_CSharp_test_tag_ptr()`. + */ + public static boolean test_tag_ptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_ptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cptr`. + * + * Calls `MR_CSharp_test_tag_cptr()`. + */ + public static boolean test_tag_cptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_variant`. + * + * Calls `MR_CSharp_test_variant()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_variant(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float a, mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ref`. + * + * Calls `MR_CSharp_test_variant_ref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_variant_ref(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float a, mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cref`. + * + * Calls `MR_CSharp_test_variant_cref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_variant_cref(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float a, mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ptr`. + * + * Calls `MR_CSharp_test_variant_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_variant_ptr(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cptr`. + * + * Calls `MR_CSharp_test_variant_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_variant_cptr(mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Test a variant that has duplicate element types. + * Generated from function `MR::CSharp::test_variant_with_repeated_types`. + * + * Calls `MR_CSharp_test_variant_with_repeated_types()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float test_variant_with_repeated_types() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_with_repeated_types.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Input and output streams: + * Generated from function `MR::CSharp::test_iostreams_ref`. + * + * Calls `MR_CSharp_test_iostreams_ref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_ptr`. + * + * Calls `MR_CSharp_test_iostreams_ptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cref`. + * + * Calls `MR_CSharp_test_iostreams_cref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cptr`. + * + * Calls `MR_CSharp_test_iostreams_cptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr`. + * + * Calls `MR_CSharp_test_uniqueptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_uniqueptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ref`. + * + * Calls `MR_CSharp_test_uniqueptr_ref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_ref(mrbind_test.mr.cs.std_unique_ptr_int32_t a, mrbind_test.mr.cs.std_unique_ptr_int32_t b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ref.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release()); + return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cref`. + * + * Calls `MR_CSharp_test_uniqueptr_cref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_cref(mrbind_test.mr.cs.std_unique_ptr_int32_t a, mrbind_test.mr.cs.std_unique_ptr_int32_t b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ptr`. + * + * Calls `MR_CSharp_test_uniqueptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_ptr(mrbind_test.mr.cs.std_unique_ptr_int32_t a, mrbind_test.mr.cs.std_unique_ptr_int32_t b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ptr.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release(), c); + return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cptr`. + * + * Calls `MR_CSharp_test_uniqueptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_cptr(mrbind_test.mr.cs.std_unique_ptr_int32_t a, mrbind_test.mr.cs.std_unique_ptr_int32_t b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ref`. + * + * Calls `MR_CSharp_test_plainarr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cref`. + * + * Calls `MR_CSharp_test_plainarr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_rref`. + * + * Calls `MR_CSharp_test_plainarr_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_crref`. + * + * Calls `MR_CSharp_test_plainarr_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_crref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ptr`. + * + * Calls `MR_CSharp_test_plainarr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cptr`. + * + * Calls `MR_CSharp_test_plainarr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ref`. + * + * Calls `MR_CSharp_test_plainarr2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cref`. + * + * Calls `MR_CSharp_test_plainarr2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_rref`. + * + * Calls `MR_CSharp_test_plainarr2_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_crref`. + * + * Calls `MR_CSharp_test_plainarr2_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_crref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ptr`. + * + * Calls `MR_CSharp_test_plainarr2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cptr`. + * + * Calls `MR_CSharp_test_plainarr2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ref`. + * + * Calls `MR_CSharp_test_plainarrenum_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cref`. + * + * Calls `MR_CSharp_test_plainarrenum_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ref`. + * + * Calls `MR_CSharp_test_plainarrenum2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cref`. + * + * Calls `MR_CSharp_test_plainarrenum2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Some multi-level pointer madness: + * Generated from function `MR::CSharp::test_ptrs1`. + * + * Calls `MR_CSharp_test_ptrs1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs1(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs1.invokeExact(ptr, ref); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ptrs2`. + * + * Calls `MR_CSharp_test_ptrs2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs2(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs2.invokeExact(ptr, ref); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ref`. + * + * Calls `MR_CSharp_test_intptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cref`. + * + * Calls `MR_CSharp_test_intptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ptr`. + * + * Calls `MR_CSharp_test_intptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cptr`. + * + * Calls `MR_CSharp_test_intptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ref`. + * + * Calls `MR_CSharp_test_intcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cref`. + * + * Calls `MR_CSharp_test_intcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ptr`. + * + * Calls `MR_CSharp_test_intcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cptr`. + * + * Calls `MR_CSharp_test_intcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ref`. + * + * Calls `MR_CSharp_test_intptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cref`. + * + * Calls `MR_CSharp_test_intptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ptr`. + * + * Calls `MR_CSharp_test_intptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cptr`. + * + * Calls `MR_CSharp_test_intptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ref`. + * + * Calls `MR_CSharp_test_voidptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cref`. + * + * Calls `MR_CSharp_test_voidptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ptr`. + * + * Calls `MR_CSharp_test_voidptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cptr`. + * + * Calls `MR_CSharp_test_voidptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ref`. + * + * Calls `MR_CSharp_test_voidptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cref`. + * + * Calls `MR_CSharp_test_voidptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ptr`. + * + * Calls `MR_CSharp_test_voidptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cptr`. + * + * Calls `MR_CSharp_test_voidptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ref`. + * + * Calls `MR_CSharp_test_arrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cref`. + * + * Calls `MR_CSharp_test_arrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ptr`. + * + * Calls `MR_CSharp_test_arrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cptr`. + * + * Calls `MR_CSharp_test_arrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ref`. + * + * Calls `MR_CSharp_test_arrcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cref`. + * + * Calls `MR_CSharp_test_arrcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ptr`. + * + * Calls `MR_CSharp_test_arrcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cptr`. + * + * Calls `MR_CSharp_test_arrcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflicts`. + * + * Calls `MR_CSharp_nameConflicts()`. + */ + public static void nameConflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflicts.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflictsExposed`. + * + * Calls `MR_CSharp_nameConflictsExposed()`. + */ + public static void nameConflictsExposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflictsExposed.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_int32_t()`. + */ + public static void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_int32_t.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_float()`. + */ + public static void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_float.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_int32_t()`. + */ + public static int template_b_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_int32_t.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_float()`. + */ + public static float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_float.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_int32_t()`. + */ + public static void template_c_int32_t() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_int32_t.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_float()`. + */ + public static void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_float.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::instantiate`. + * + * Calls `MR_CSharp_instantiate()`. + */ + public static void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_instantiate.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_C_deref_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * The reference to the parameter `c` might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesC()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_MR_CSharp_LifetimesC.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer begin_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer end_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_begin_int32_t()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableL_int32_t self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * The reference to the parameter `self` might be preserved in the return value. + * + * Calls `MR_CSharp_end_int32_t()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableL_int32_t self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Vectors of pointers to a class. + * Currently `IEnumerable` is disabled for those, it needs to be fixed. + * Generated from function `MR::CSharp::test_vec_of_mut_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_mut_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr test_vec_of_mut_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_mut_ptr_to_class.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_vec_of_const_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_const_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr test_vec_of_const_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_const_ptr_to_class.invokeExact(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test decomposition for certain whitelisted standard tuple-like types: (tuples and pairs) + * Generated from function `MR::CSharp::get_tuple0`. + * + * Calls `MR_CSharp_get_tuple0()`. + */ + public static mrbind_test.mr.cs.std_tuple get_tuple0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple0.invokeExact(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple1`. + * + * Calls `MR_CSharp_get_tuple1()`. + */ + public static mrbind_test.mr.cs.std_tuple_int32_t get_tuple1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple1.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple2`. + * + * Calls `MR_CSharp_get_tuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_int32_t_std_string get_tuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple2.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int32_t_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_pair2`. + * + * Calls `MR_CSharp_get_pair2()`. + */ + public static mrbind_test.mr.cs.std_pair_int32_t_std_string get_pair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_pair2.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int32_t_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_const`. + * + * Calls `MR_CSharp_get_tuple_const()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int32_t_std_string get_tuple_const() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_const.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int32_t_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_refs`. + * + * Calls `MR_CSharp_get_tuple_refs()`. + */ + public static mrbind_test.mr.cs.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref get_tuple_refs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_refs.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_crefs`. + * + * Calls `MR_CSharp_get_tuple_crefs()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref get_tuple_crefs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_crefs.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_value`. + * + * Calls `MR_CSharp_get_tuple_exposed_value()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout get_tuple_exposed_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_value.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_lvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_lvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref get_tuple_exposed_lvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_lvalue_ref.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_rvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_rvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref get_tuple_exposed_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_rvalue_ref.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int`. + * + * Calls `MR_CSharp_test_expected_int()`. + */ + public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int(mrbind_test.mr.cs.expected_int32_t_float a, mrbind_test.mr.cs.expected_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ref`. + * + * Calls `MR_CSharp_test_expected_int_ref()`. + */ + public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_ref(mrbind_test.mr.cs.expected_int32_t_float a, mrbind_test.mr.cs.expected_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cref`. + * + * Calls `MR_CSharp_test_expected_int_cref()`. + */ + public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_cref(mrbind_test.mr.cs.expected_int32_t_float a, mrbind_test.mr.cs.expected_int32_t_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ptr`. + * + * Calls `MR_CSharp_test_expected_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_ptr(mrbind_test.mr.cs.expected_int32_t_float a, mrbind_test.mr.cs.expected_int32_t_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cptr`. + * + * Calls `MR_CSharp_test_expected_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_cptr(mrbind_test.mr.cs.expected_int32_t_float a, mrbind_test.mr.cs.expected_int32_t_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void`. + * + * Calls `MR_CSharp_test_expected_void()`. + */ + public static mrbind_test.mr.cs.expected_void_float test_expected_void(mrbind_test.mr.cs.expected_void_float a, mrbind_test.mr.cs.expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ref`. + * + * Calls `MR_CSharp_test_expected_void_ref()`. + */ + public static mrbind_test.mr.cs.expected_void_float test_expected_void_ref(mrbind_test.mr.cs.expected_void_float a, mrbind_test.mr.cs.expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cref`. + * + * Calls `MR_CSharp_test_expected_void_cref()`. + */ + public static mrbind_test.mr.cs.expected_void_float test_expected_void_cref(mrbind_test.mr.cs.expected_void_float a, mrbind_test.mr.cs.expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ptr`. + * + * Calls `MR_CSharp_test_expected_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_void_float test_expected_void_ptr(mrbind_test.mr.cs.expected_void_float a, mrbind_test.mr.cs.expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cptr`. + * + * Calls `MR_CSharp_test_expected_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_void_float test_expected_void_cptr(mrbind_test.mr.cs.expected_void_float a, mrbind_test.mr.cs.expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum`. + * + * Calls `MR_CSharp_test_expected_enum()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum(mrbind_test.mr.cs.expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ref`. + * + * Calls `MR_CSharp_test_expected_enum_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_ref(mrbind_test.mr.cs.expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cref`. + * + * Calls `MR_CSharp_test_expected_enum_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_cref(mrbind_test.mr.cs.expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ptr`. + * + * Calls `MR_CSharp_test_expected_enum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_ptr(mrbind_test.mr.cs.expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cptr`. + * + * Calls `MR_CSharp_test_expected_enum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_cptr(mrbind_test.mr.cs.expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv`. + * + * Calls `MR_CSharp_test_expected_triv()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_triv(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ref`. + * + * Calls `MR_CSharp_test_expected_triv_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_triv_ref(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cref`. + * + * Calls `MR_CSharp_test_expected_triv_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_triv_cref(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ptr`. + * + * Calls `MR_CSharp_test_expected_triv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_triv_ptr(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cptr`. + * + * Calls `MR_CSharp_test_expected_triv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_triv_cptr(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv`. + * + * Calls `MR_CSharp_test_expected_nontriv()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expected_nontriv(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ref`. + * + * Calls `MR_CSharp_test_expected_nontriv_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ref(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cref`. + * + * Calls `MR_CSharp_test_expected_nontriv_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cref(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ptr(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cptr(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared`. + * + * Calls `MR_CSharp_test_expected_shared()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared(mrbind_test.mr.cs.expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ref`. + * + * Calls `MR_CSharp_test_expected_shared_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared_ref(mrbind_test.mr.cs.expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cref`. + * + * Calls `MR_CSharp_test_expected_shared_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared_cref(mrbind_test.mr.cs.expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared_ptr(mrbind_test.mr.cs.expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared_cptr(mrbind_test.mr.cs.expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed`. + * + * Calls `MR_CSharp_test_expected_exposed()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expected_exposed(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ref(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cref(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ptr(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cptr(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared`. + * + * Calls `MR_CSharp_test_expected_exposed_shared()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ref(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cref()`. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cref(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ptr(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cptr(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java new file mode 100644 index 00000000..31c004cf --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.csharp; + +/** + * Even if the secondary bases are virtual, this doesn't affect anything. + * Generated from class `MR::CSharp::G`. + * Base classes: + * Virtual: + * `MR::CSharp::E` + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.csharp.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_G_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java new file mode 100644 index 00000000..fb59f58d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is the happy path. + * This emits static operators in the const half, and non-static operators (or functions pre C# 14) in the non-const half. + * Generated from class `MR::CSharp::IncrDecrA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrA_DefaultConstruct()`. + */ + public IncrDecrA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrA::IncrDecrA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrA_ConstructFromAnother()`. + */ + public IncrDecrA(mrbind_test.mr.csharp.IncrDecrA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrA assignFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java new file mode 100644 index 00000000..481d85d5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Same as above, but everything gets emitted in the const half. + * Generated from class `MR::CSharp::IncrDecrB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrB_DefaultConstruct()`. + */ + public IncrDecrB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrB::IncrDecrB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrB_ConstructFromAnother()`. + */ + public IncrDecrB(mrbind_test.mr.csharp.IncrDecrB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrB assignFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java new file mode 100644 index 00000000..04381a7c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are not marked const, so they're also in the non-const half. + * Generated from class `MR::CSharp::IncrDecrC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrC_DefaultConstruct()`. + */ + public IncrDecrC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrC::IncrDecrC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrC_ConstructFromAnother()`. + */ + public IncrDecrC(mrbind_test.mr.csharp.IncrDecrC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrC assignFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java new file mode 100644 index 00000000..0c342127 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are in the const half due to being marked const. + * Generated from class `MR::CSharp::IncrDecrD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrD_DefaultConstruct()`. + */ + public IncrDecrD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrD::IncrDecrD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrD_ConstructFromAnother()`. + */ + public IncrDecrD(mrbind_test.mr.csharp.IncrDecrD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrD assignFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java new file mode 100644 index 00000000..5bf4f92e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the non-const half. + * Generated from class `MR::CSharp::IncrDecrE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrE_DefaultConstruct()`. + */ + public IncrDecrE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrE::IncrDecrE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrE_ConstructFromAnother()`. + */ + public IncrDecrE(mrbind_test.mr.csharp.IncrDecrE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java new file mode 100644 index 00000000..0656b24b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the const half. + * Generated from class `MR::CSharp::IncrDecrF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrF_DefaultConstruct()`. + */ + public IncrDecrF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrF::IncrDecrF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrF_ConstructFromAnother()`. + */ + public IncrDecrF(mrbind_test.mr.csharp.IncrDecrF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java new file mode 100644 index 00000000..0dbcefea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrG_DefaultConstruct()`. + */ + public IncrDecrG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrG::IncrDecrG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrG_ConstructFromAnother()`. + */ + public IncrDecrG(mrbind_test.mr.csharp.IncrDecrG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java new file mode 100644 index 00000000..6bcf3bf8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrH_DefaultConstruct()`. + */ + public IncrDecrH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrH::IncrDecrH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrH_ConstructFromAnother()`. + */ + public IncrDecrH(mrbind_test.mr.csharp.IncrDecrH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java new file mode 100644 index 00000000..6aa6c10e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Friend functions. + * Generated from class `MR::CSharp::IncrDecrI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrI_DefaultConstruct()`. + */ + public IncrDecrI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrI::IncrDecrI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrI_ConstructFromAnother()`. + */ + public IncrDecrI(mrbind_test.mr.csharp.IncrDecrI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrI assignFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java new file mode 100644 index 00000000..2efe8b0c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * Subscription operator. + * Generated from class `MR::CSharp::IndexerA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerA_DefaultConstruct()`. + */ + public IndexerA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerA` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerA_ConstructFrom()`. + */ + public IndexerA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerA::IndexerA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerA_ConstructFromAnother()`. + */ + public IndexerA(mrbind_test.mr.csharp.IndexerA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerA assignFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator[]`. + * + * Calls `MR_CSharp_IndexerA_index()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment index(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_index.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerA` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_CSharp_IndexerA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..9b54a2fc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,245 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerB_DefaultConstruct()`. + */ + public IndexerB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFrom()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.IndexerA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerB::IndexerB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFromAnother()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerB assignFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_1()`. + */ + public mrbind_test.mr.csharp.IndexerA index_1(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_1.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_2()`. + */ + public mrbind_test.mr.csharp.IndexerA index_2(int i, int j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_2.invokeExact(rawPointer(), i, j); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_0()`. + */ + public mrbind_test.mr.csharp.IndexerA index_0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_0.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerB_Get_a()`. + */ + public mrbind_test.mr.csharp.IndexerA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_IndexerB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.IndexerA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java new file mode 100644 index 00000000..ad8df4b1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java @@ -0,0 +1,145 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerC_DefaultConstruct()`. + */ + public IndexerC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerC::IndexerC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerC_ConstructFromAnother()`. + */ + public IndexerC(mrbind_test.mr.csharp.IndexerC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerC assignFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index_mut()`. + */ + public int index_mut(int i) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index()`. + */ + public float index(int i) + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java new file mode 100644 index 00000000..865a3e71 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.csharp; + +/** + * Const member functions. + * Generated from class `MR::CSharp::IterableA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableA_DefaultConstruct()`. + */ + public IterableA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableA::IterableA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableA_ConstructFromAnother()`. + */ + public IterableA(mrbind_test.mr.csharp.IterableA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableA assignFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableA_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableA_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableA` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableA_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableA` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableA_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java new file mode 100644 index 00000000..1c9eb078 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable member functions. + * Generated from class `MR::CSharp::IterableB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableB_DefaultConstruct()`. + */ + public IterableB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableB::IterableB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableB_ConstructFromAnother()`. + */ + public IterableB(mrbind_test.mr.csharp.IterableB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableB assignFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableB_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableB_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableB` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableB_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableB` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableB_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java new file mode 100644 index 00000000..5566f89e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,235 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable member functions. + * Generated from class `MR::CSharp::IterableC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableC_DefaultConstruct()`. + */ + public IterableC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableC::IterableC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableC_ConstructFromAnother()`. + */ + public IterableC(mrbind_test.mr.csharp.IterableC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableC assignFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableC_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableC` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableC_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableC` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableC_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java new file mode 100644 index 00000000..a4b5795f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Const free functions. + * Generated from class `MR::CSharp::IterableD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableD_DefaultConstruct()`. + */ + public IterableD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableD::IterableD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableD_ConstructFromAnother()`. + */ + public IterableD(mrbind_test.mr.csharp.IterableD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableD assignFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableD` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableD_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableD` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableD_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java new file mode 100644 index 00000000..54727fbe --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable free functions. + * Generated from class `MR::CSharp::IterableE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableE_DefaultConstruct()`. + */ + public IterableE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableE::IterableE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableE_ConstructFromAnother()`. + */ + public IterableE(mrbind_test.mr.csharp.IterableE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableE assignFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableE` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableE_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableE` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableE_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java new file mode 100644 index 00000000..1d209312 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable free functions. + * Generated from class `MR::CSharp::IterableF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableF_DefaultConstruct()`. + */ + public IterableF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableF::IterableF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableF_ConstructFromAnother()`. + */ + public IterableF(mrbind_test.mr.csharp.IterableF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableF assignFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableF` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableF_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableF` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableF_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java new file mode 100644 index 00000000..6bd97eae --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable class instances. + * Generated from class `MR::CSharp::IterableG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableG_DefaultConstruct()`. + */ + public IterableG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableG::IterableG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableG_ConstructFromAnother()`. + */ + public IterableG(mrbind_test.mr.csharp.IterableG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableG assignFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableG_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableG_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableG` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableG_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableG` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableG_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java new file mode 100644 index 00000000..bc3998df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const class instances. + * Generated from class `MR::CSharp::IterableH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableH_DefaultConstruct()`. + */ + public IterableH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableH::IterableH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableH_ConstructFromAnother()`. + */ + public IterableH(mrbind_test.mr.csharp.IterableH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableH::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableH_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableH_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableH` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableH_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableH` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableH_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java new file mode 100644 index 00000000..f098e14f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable exposed struct instances. + * Generated from class `MR::CSharp::IterableI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableI_DefaultConstruct()`. + */ + public IterableI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableI::IterableI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableI_ConstructFromAnother()`. + */ + public IterableI(mrbind_test.mr.csharp.IterableI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableI_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableI_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableI` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableI_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableI` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableI_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java new file mode 100644 index 00000000..4ac383fd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const exposed struct instances. + * Generated from class `MR::CSharp::IterableJ`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableJ extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableJ(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableJ::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableJ_DefaultConstruct()`. + */ + public IterableJ() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableJ::IterableJ`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableJ_ConstructFromAnother()`. + */ + public IterableJ(mrbind_test.mr.csharp.IterableJ _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableJ_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableJ assignFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableJ(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableJ::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableJ_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableJ_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableJ` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableJ_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableJ` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableJ_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java new file mode 100644 index 00000000..fe4ddb7a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.csharp; + +/** + * The sentinel having a different type. + * Generated from class `MR::CSharp::IterableK`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_DefaultConstruct()`. + */ + public IterableK() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::IterableK`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_ConstructFromAnother()`. + */ + public IterableK(mrbind_test.mr.csharp.IterableK _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK assignFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableK::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableK_begin()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableK_end()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_end.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableK` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableK_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java new file mode 100644 index 00000000..e3c4456c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,237 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Iter`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Iter extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Iter::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Iter_DefaultConstruct()`. + */ + public IterableK_Iter() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Iter` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Iter::Iter`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFromAnother()`. + */ + public IterableK_Iter(mrbind_test.mr.csharp.IterableK_Iter _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Iter_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter assignFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_IterableK_Iter()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IterableK_Iter()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.IterableK_Sentinel s) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(s); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Iter_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Iter_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java new file mode 100644 index 00000000..4510a1f2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Sentinel`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Sentinel extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Sentinel::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Sentinel_DefaultConstruct()`. + */ + public IterableK_Sentinel() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Sentinel` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Sentinel::Sentinel`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFromAnother()`. + */ + public IterableK_Sentinel(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Sentinel::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Sentinel_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel assignFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Sentinel_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Sentinel_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java new file mode 100644 index 00000000..d8ddda94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.csharp; + +/** + * Templated free functions. + * Generated from class `MR::CSharp::IterableL`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableL_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableL_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableL_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableL_int32_t_DefaultConstruct()`. + */ + public IterableL_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableL::IterableL`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableL_int32_t_ConstructFromAnother()`. + */ + public IterableL_int32_t(mrbind_test.mr.csharp.IterableL_int32_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableL_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableL_int32_t_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableL_int32_t assignFromAnother(mrbind_test.mr.csharp.IterableL_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableL_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableL_int32_t_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_IterableL_int32_t_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableL` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableL_int32_t_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableL` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableL_int32_t_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java new file mode 100644 index 00000000..f09dba23 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.csharp; + +/** + * Keep-alive sorcery: + * Generated from class `MR::CSharp::LifetimesA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesA_DefaultConstruct()`. + */ + public LifetimesA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesA` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesA_ConstructFrom()`. + */ + public LifetimesA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesA::LifetimesA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesA_ConstructFromAnother()`. + */ + public LifetimesA(mrbind_test.mr.csharp.LifetimesA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesA assignFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Some degenerate cases that have to be ignored in C#, because we don't support the lifetime operations for those types. + * Generated from method `MR::CSharp::LifetimesA::foo`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesA_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::bar`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public void bar(java.lang.foreign.MemorySegment ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_bar.invokeExact(rawPointer(), ref); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesA` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_CSharp_LifetimesA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..b1a5c4a3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesB_DefaultConstruct()`. + */ + public LifetimesB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFrom()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesB::LifetimesB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFromAnother()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesB assignFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from method `MR::CSharp::LifetimesB::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesB_begin()`. + */ + public mrbind_test.mr.csharp.LifetimesA begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesB_end()`. + */ + public mrbind_test.mr.csharp.LifetimesA end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesB_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA opMul() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_LifetimesB_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesB_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java new file mode 100644 index 00000000..3d0aad96 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesC_DefaultConstruct()`. + */ + public LifetimesC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesC` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFrom()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesC::LifetimesC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFromAnother()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesC assignFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesC_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesC_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java new file mode 100644 index 00000000..655c49af --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,357 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_ConstructFromAnother()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Store param references in this. The two annotation styles are equivalent for constructors. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the parameter `ref` might be preserved in the constructed object. + * The reference to the parameter `other_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_Construct_2()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + this(__ctor_construct_2(ref, other_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_2.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * `--infer-lifetime-constructors` should act on this. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesA(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesA(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Store reference to this in param. + * `--infer-lifetime-constructors` skips this, because we already have custom attributes. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the constructed object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesB(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesB(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesD assignFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::get`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref_static`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref_static()`. + */ + public static mrbind_test.mr.csharp.LifetimesA return_ref_static(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref_static.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_this`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_param`. + * The reference to the parameter `ref` might be preserved in the parameter `other_ref`. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_param()`. + */ + public void store_ref_in_param(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_this_in_param`. + * The reference to this object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_store_this_in_param()`. + */ + public void store_this_in_param(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_this_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesD_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesD_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java new file mode 100644 index 00000000..a2562095 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.csharp; + +/** + * Nested attributes. + * Generated from class `MR::CSharp::LifetimesE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesE_ConstructFromAnother()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the constructed object (if any) might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesE_Construct()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesE assignFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::get`. + * The reference to things referred to by this object (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::return_ref`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::store_ref_in_this`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesE_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesE_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java new file mode 100644 index 00000000..e27caee0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,244 @@ +package mrbind_test.mr.csharp; + +/** + * Members having the same name as the exposed class, after rewriting. + * Generated from class `MR::CSharp::NameConflicts`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_DefaultConstruct()`. + */ + public NameConflicts() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::NameConflicts` elementwise. + * The reference to the parameter `name_conflicts` might be preserved in the constructed object. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFrom()`. + */ + public NameConflicts(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + this(__ctor_constructFrom(name_conflicts, a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFrom.invokeExact(name_conflicts, mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::NameConflicts`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFromAnother()`. + */ + public NameConflicts(mrbind_test.mr.csharp.NameConflicts _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts assignFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::name_Conflicts`. + * + * Calls `MR_CSharp_NameConflicts_name_Conflicts()`. + */ + public void name_Conflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_name_Conflicts.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_name_conflicts()`. + */ + public int name_conflicts() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * The reference to the parameter `value` might be preserved in this object in element `name_conflicts`. + * + * Calls `MR_CSharp_NameConflicts_Set_name_conflicts()`. + */ + public void setName_conflicts(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_a()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_NameConflicts_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.NameConflicts_A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java new file mode 100644 index 00000000..9101fee3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java @@ -0,0 +1,55 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"name_conflicts_exposed", "a"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT}); + public static final long OFF_name_conflicts_exposed = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("name_conflicts_exposed")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 8, 4, "MR::CSharp::NameConflictsExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed copy() {return new NameConflictsExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int name_conflicts_exposed() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed);} + public void setName_conflicts_exposed(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed, value);} + + public mrbind_test.mr.csharp.NameConflictsExposed_A a() {return new mrbind_test.mr.csharp.NameConflictsExposed_A(segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.csharp.NameConflictsExposed_A value) {segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + /** + * Generated from method `MR::CSharp::NameConflictsExposed::name_Conflicts_exposed`. + * + * Calls `MR_CSharp_NameConflictsExposed_name_Conflicts_exposed()`. + */ + public void name_Conflicts_exposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflictsExposed_name_Conflicts_exposed.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public NameConflictsExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java new file mode 100644 index 00000000..82e55f43 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed_A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::NameConflictsExposed::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed_A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed_A copy() {return new NameConflictsExposed_A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed_A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public NameConflictsExposed_A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java new file mode 100644 index 00000000..55f6ac0c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflicts::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_A_DefaultConstruct()`. + */ + public NameConflicts_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_A_ConstructFromAnother()`. + */ + public NameConflicts_A(mrbind_test.mr.csharp.NameConflicts_A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A assignFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java new file mode 100644 index 00000000..1c853993 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, so operators with by-value parameters fail to inject. + * Generated from class `MR::CSharp::NonCopyableClassByValueOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonCopyableClassByValueOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonCopyableClassByValueOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonCopyableClassByValueOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct()`. + */ + public NonCopyableClassByValueOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonCopyableClassByValueOps::NonCopyableClassByValueOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother()`. + */ + public NonCopyableClassByValueOps(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonCopyableClassByValueOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonCopyableClassByValueOps assignFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonCopyableClassByValueOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java new file mode 100644 index 00000000..625b75e9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivial::NonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public NonTrivial(mrbind_test.mr.csharp.NonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java new file mode 100644 index 00000000..fc5cdb89 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * Check how non-trivial class types are passed by value into operators. + * Generated from class `MR::CSharp::NonTrivialClassOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialClassOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialClassOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialClassOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialClassOps_DefaultConstruct()`. + */ + public NonTrivialClassOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialClassOps::NonTrivialClassOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialClassOps_ConstructFromAnother()`. + */ + public NonTrivialClassOps(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialClassOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialClassOps assignFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialClassOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_int32_t()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_add_MR_CSharp_NonTrivialClassOps_int32_t.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java new file mode 100644 index 00000000..484ff171 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialDerived_DefaultConstruct()`. + */ + public NonTrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialDerived::NonTrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialDerived_ConstructFromAnother()`. + */ + public NonTrivialDerived(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialDerived assignFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java new file mode 100644 index 00000000..0ad391df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.csharp; + +/** + * Nested classes. + * Generated from class `MR::CSharp::Outer`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_DefaultConstruct()`. + */ + public Outer() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Outer`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_ConstructFromAnother()`. + */ + public Outer(mrbind_test.mr.csharp.Outer _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer assignFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::foo`. + * + * Calls `MR_CSharp_Outer_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java new file mode 100644 index 00000000..357fc310 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java @@ -0,0 +1,122 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Outer::Inner`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer_Inner extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer_Inner(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer_Inner::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_Inner_DefaultConstruct()`. + */ + public Outer_Inner() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Inner::Inner`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_Inner_ConstructFromAnother()`. + */ + public Outer_Inner(mrbind_test.mr.csharp.Outer_Inner _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_Inner_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer_Inner assignFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer_Inner(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::bar`. + * + * Calls `MR_CSharp_Outer_Inner_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java new file mode 100644 index 00000000..96429cf4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is const. + * Generated from class `MR::CSharp::RelationalA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalA_DefaultConstruct()`. + */ + public RelationalA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalA::RelationalA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalA_ConstructFromAnother()`. + */ + public RelationalA(mrbind_test.mr.csharp.RelationalA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalA assignFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalA()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalA()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalA()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalA()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java new file mode 100644 index 00000000..0d33f09a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is non-const. + * Generated from class `MR::CSharp::RelationalB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalB_DefaultConstruct()`. + */ + public RelationalB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalB::RelationalB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalB_ConstructFromAnother()`. + */ + public RelationalB(mrbind_test.mr.csharp.RelationalB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalB assignFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalB()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalB()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalB()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalB()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java new file mode 100644 index 00000000..b1e3f4a8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java @@ -0,0 +1,172 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have mixed constness, which causes them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalC_DefaultConstruct()`. + */ + public RelationalC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalC::RelationalC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalC_ConstructFromAnother()`. + */ + public RelationalC(mrbind_test.mr.csharp.RelationalC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalC assignFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * bool operator<=(RelationalC &) const {return false;} // Skip one operator to observe the function missing. + * Generated from method `MR::CSharp::RelationalC::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java new file mode 100644 index 00000000..92abdcb6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have operands of different types, causing them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalD_DefaultConstruct()`. + */ + public RelationalD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalD::RelationalD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalD_ConstructFromAnother()`. + */ + public RelationalD(mrbind_test.mr.csharp.RelationalD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalD assignFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java new file mode 100644 index 00000000..d3c0bff1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have a weird return type. + * Generated from class `MR::CSharp::RelationalE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalE_DefaultConstruct()`. + */ + public RelationalE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalE::RelationalE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalE_ConstructFromAnother()`. + */ + public RelationalE(mrbind_test.mr.csharp.RelationalE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalE assignFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java new file mode 100644 index 00000000..faeb0cc5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.csharp; + +/** + * The operators return void. + * Generated from class `MR::CSharp::RelationalF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalF_DefaultConstruct()`. + */ + public RelationalF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalF::RelationalF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalF_ConstructFromAnother()`. + */ + public RelationalF(mrbind_test.mr.csharp.RelationalF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java new file mode 100644 index 00000000..56e6972d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SA`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SA_DefaultConstruct()`. + */ + public SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SA::SA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SA_ConstructFromAnother()`. + */ + public SA(mrbind_test.mr.csharp.SA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java new file mode 100644 index 00000000..ae901a59 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SB_DefaultConstruct()`. + */ + public SB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SB` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFrom()`. + */ + public SB(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SB::SB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFromAnother()`. + */ + public SB(mrbind_test.mr.csharp.SB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SB assignFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SB` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SB_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SB` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SB_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..5ef2d25e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SC`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SA` + * `MR::CSharp::SB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SC_DefaultConstruct()`. + */ + public SC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SC::SC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SC_ConstructFromAnother()`. + */ + public SC(mrbind_test.mr.csharp.SC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java new file mode 100644 index 00000000..8d663345 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SD`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SD_DefaultConstruct()`. + */ + public SD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SD::SD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SD_ConstructFromAnother()`. + */ + public SD(mrbind_test.mr.csharp.SD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_SD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SD assignFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java new file mode 100644 index 00000000..54dcc8fc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SE`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SE_DefaultConstruct()`. + */ + public SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SE` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFrom()`. + */ + public SE(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SE::SE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFromAnother()`. + */ + public SE(mrbind_test.mr.csharp.SE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SE assignFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SE` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SE_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SE` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SE_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..4997ce50 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SF`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SD` + * `MR::CSharp::SE` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SF_DefaultConstruct()`. + */ + public SF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SF::SF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SF_ConstructFromAnother()`. + */ + public SF(mrbind_test.mr.csharp.SF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java new file mode 100644 index 00000000..9f3a8c56 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.csharp; + +/** + * Make sure non-passable classes work fine as `std::shared_ptr` template arguments. + * Generated from class `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsEnum.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsEnum.java new file mode 100644 index 00000000..21fe05b7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsEnum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.csharp; + +/** + * Other injection cases: + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class StaticOpsEnum +{ + public final int value; + + public StaticOpsEnum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static StaticOpsEnum of(int value) + { + return new StaticOpsEnum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof StaticOpsEnum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "StaticOpsEnum(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java new file mode 100644 index 00000000..0172dd4d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsLhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsA_DefaultConstruct()`. + */ + public StaticOpsLhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsA::StaticOpsLhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsA_ConstructFromAnother()`. + */ + public StaticOpsLhsA(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java new file mode 100644 index 00000000..7d226444 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsLhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsB_DefaultConstruct()`. + */ + public StaticOpsLhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsB::StaticOpsLhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsB_ConstructFromAnother()`. + */ + public StaticOpsLhsB(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java new file mode 100644 index 00000000..11b48c00 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsLhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsC_DefaultConstruct()`. + */ + public StaticOpsLhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsC::StaticOpsLhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsC_ConstructFromAnother()`. + */ + public StaticOpsLhsC(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java new file mode 100644 index 00000000..540e79c6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsD_DefaultConstruct()`. + */ + public StaticOpsLhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsD::StaticOpsLhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsD_ConstructFromAnother()`. + */ + public StaticOpsLhsD(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java new file mode 100644 index 00000000..0add2da7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsE_DefaultConstruct()`. + */ + public StaticOpsLhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsE::StaticOpsLhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsE_ConstructFromAnother()`. + */ + public StaticOpsLhsE(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java new file mode 100644 index 00000000..938e41e1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsF_DefaultConstruct()`. + */ + public StaticOpsLhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsF::StaticOpsLhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsF_ConstructFromAnother()`. + */ + public StaticOpsLhsF(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java new file mode 100644 index 00000000..9fbfe7e5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsLhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsG_DefaultConstruct()`. + */ + public StaticOpsLhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsG::StaticOpsLhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsG_ConstructFromAnother()`. + */ + public StaticOpsLhsG(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java new file mode 100644 index 00000000..f00d2f79 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsLhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsH_DefaultConstruct()`. + */ + public StaticOpsLhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsH::StaticOpsLhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsH_ConstructFromAnother()`. + */ + public StaticOpsLhsH(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java new file mode 100644 index 00000000..0fb4e8d5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedLhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedLhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedLhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedLhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_DefaultConstruct()`. + */ + public StaticOpsMixedLhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedLhs::StaticOpsMixedLhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother()`. + */ + public StaticOpsMixedLhs(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedLhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedLhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedLhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java new file mode 100644 index 00000000..1aa7230a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedRhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedRhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedRhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedRhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_DefaultConstruct()`. + */ + public StaticOpsMixedRhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedRhs::StaticOpsMixedRhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother()`. + */ + public StaticOpsMixedRhs(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedRhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedRhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedRhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java new file mode 100644 index 00000000..df37f16b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsRhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsA_DefaultConstruct()`. + */ + public StaticOpsRhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsA::StaticOpsRhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsA_ConstructFromAnother()`. + */ + public StaticOpsRhsA(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java new file mode 100644 index 00000000..a96e7825 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsRhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsB_DefaultConstruct()`. + */ + public StaticOpsRhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsB::StaticOpsRhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsB_ConstructFromAnother()`. + */ + public StaticOpsRhsB(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java new file mode 100644 index 00000000..ab1ad306 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsRhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsC_DefaultConstruct()`. + */ + public StaticOpsRhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsC::StaticOpsRhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsC_ConstructFromAnother()`. + */ + public StaticOpsRhsC(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java new file mode 100644 index 00000000..e155b6a1 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsD_DefaultConstruct()`. + */ + public StaticOpsRhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsD::StaticOpsRhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsD_ConstructFromAnother()`. + */ + public StaticOpsRhsD(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java new file mode 100644 index 00000000..a9a4fce8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsE_DefaultConstruct()`. + */ + public StaticOpsRhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsE::StaticOpsRhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsE_ConstructFromAnother()`. + */ + public StaticOpsRhsE(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java new file mode 100644 index 00000000..b00f0824 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsF_DefaultConstruct()`. + */ + public StaticOpsRhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsF::StaticOpsRhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsF_ConstructFromAnother()`. + */ + public StaticOpsRhsF(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java new file mode 100644 index 00000000..d7fd6a81 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsRhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsG_DefaultConstruct()`. + */ + public StaticOpsRhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsG::StaticOpsRhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsG_ConstructFromAnother()`. + */ + public StaticOpsRhsG(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java new file mode 100644 index 00000000..0279feb6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsRhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsH_DefaultConstruct()`. + */ + public StaticOpsRhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsH::StaticOpsRhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsH_ConstructFromAnother()`. + */ + public StaticOpsRhsH(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java new file mode 100644 index 00000000..bd088d9b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvFsPath`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvFsPath extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvFsPath(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvFsPath::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvFsPath_DefaultConstruct()`. + */ + public StringConvFsPath() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvFsPath::StringConvFsPath`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvFsPath_ConstructFromAnother()`. + */ + public StringConvFsPath(mrbind_test.mr.csharp.StringConvFsPath _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvFsPath::operator std::filesystem::path`. + * + * Calls `MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path()`. + */ + public mrbind_test.mr.cs.std_filesystem_path convertTo_std_filesystem_path() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvFsPath::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvFsPath_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvFsPath assignFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvFsPath(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java new file mode 100644 index 00000000..59a73abb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Conversions to string-like types. + * Those create the additional `operator string` to convert directly to a C# string, and `override string ToString()` to override the method of the implicit base `object`. + * Generated from class `MR::CSharp::StringConvString`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvString extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvString(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvString::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvString_DefaultConstruct()`. + */ + public StringConvString() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvString::StringConvString`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvString_ConstructFromAnother()`. + */ + public StringConvString(mrbind_test.mr.csharp.StringConvString _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvString::operator std::string`. + * + * Calls `MR_CSharp_StringConvString_ConvertTo_std_string()`. + */ + public mrbind_test.mr.cs.std_string convertTo_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConvertTo_std_string.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvString::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvString_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvString assignFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvString(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java new file mode 100644 index 00000000..3a3ed2f2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvStringView`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvStringView extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvStringView(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvStringView::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvStringView_DefaultConstruct()`. + */ + public StringConvStringView() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvStringView::StringConvStringView`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvStringView_ConstructFromAnother()`. + */ + public StringConvStringView(mrbind_test.mr.csharp.StringConvStringView _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Mark this `explicit` and `const` for a change. + * Generated from conversion operator `MR::CSharp::StringConvStringView::operator std::string_view`. + * + * Calls `MR_CSharp_StringConvStringView_ConvertTo_std_string_view()`. + */ + public mrbind_test.mr.cs.std_string_view convertTo_std_string_view() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConvertTo_std_string_view.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvStringView::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvStringView_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvStringView assignFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvStringView(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java new file mode 100644 index 00000000..0d4675cc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestConstness`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestConstness extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestConstness(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestConstness::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestConstness_DefaultConstruct()`. + */ + public TestConstness() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestConstness::TestConstness`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestConstness_ConstructFromAnother()`. + */ + public TestConstness(mrbind_test.mr.csharp.TestConstness _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestConstness_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestConstness assignFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestConstness(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo_mut()`. + */ + public void foo_mut() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo_mut.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java new file mode 100644 index 00000000..b71ea577 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,511 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestFields`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestFields extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestFields(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestFields::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestFields::TestFields`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFromAnother()`. + */ + public TestFields(mrbind_test.mr.csharp.TestFields _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestFields _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::TestFields` elementwise. + * The reference to the parameter `i` might be preserved in the constructed object. + * The reference to the parameter `const_i` might be preserved in the constructed object. + * The reference to the parameter `i_ref` might be preserved in the constructed object. + * The reference to the parameter `const_i_ref` might be preserved in the constructed object. + * The reference to the parameter `s` might be preserved in the constructed object. + * The reference to the parameter `const_s` might be preserved in the constructed object. + * The reference to the parameter `s_ref` might be preserved in the constructed object. + * The reference to the parameter `const_s_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public TestFields(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + this(__ctor_constructFrom(i, const_i, i_ref, const_i_ref, s, const_s, s_ref, const_s_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __str_const_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s, "const_s")); + java.lang.foreign.MemorySegment __str_const_s_ref = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s_ref, "const_s_ref")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFrom.invokeExact(i, const_i, i_ref, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, const_i_ref), __str_s, mrbind_test.Ffi.end(__str_s), __str_const_s, mrbind_test.Ffi.end(__str_const_s), mrbind_test.Ffi.ptrNonNull(s_ref, "s_ref"), __str_const_s_ref, mrbind_test.Ffi.end(__str_const_s_ref)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(s_ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_i()`. + */ + public static int static_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_i`. + * The reference to the parameter `value` might be preserved in this object in element `static_i`. + * + * Calls `MR_CSharp_TestFields_Set_static_i()`. + */ + public static void setStatic_i(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i()`. + */ + public static int static_const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment static_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i_ref()`. + */ + public static int static_const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_s()`. + */ + public static mrbind_test.mr.cs.std_string static_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_s`. + * The reference to the parameter `value` might be preserved in this object in element `static_s`. + * + * Calls `MR_CSharp_TestFields_Set_static_s()`. + */ + public static void setStatic_s(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * < Test same-line documentation comment. + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * < Test same-line documentation comment. + * Modifies a member variable of class `MR::CSharp::TestFields` named `i`. + * The reference to the parameter `value` might be preserved in this object in element `i`. + * + * Calls `MR_CSharp_TestFields_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i()`. + */ + public int const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i_ref()`. + */ + public int const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_TestFields_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s()`. + */ + public mrbind_test.mr.cs.std_string const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s_ref()`. + */ + public mrbind_test.mr.cs.std_string s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s_ref()`. + */ + public mrbind_test.mr.cs.std_string const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java new file mode 100644 index 00000000..b54a4d36 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java @@ -0,0 +1,853 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsA::TestOpsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsA_ConstructFromAnother()`. + */ + public TestOpsA(mrbind_test.mr.csharp.TestOpsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsA_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsA()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsA()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsA()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsA()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsA()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsA()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsA()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsA()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsA()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsA()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsA()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsA()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsA()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsA()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+=`. + * + * Calls `MR_CSharp_TestOpsA_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-=`. + * + * Calls `MR_CSharp_TestOpsA_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*=`. + * + * Calls `MR_CSharp_TestOpsA_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/=`. + * + * Calls `MR_CSharp_TestOpsA_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%=`. + * + * Calls `MR_CSharp_TestOpsA_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^=`. + * + * Calls `MR_CSharp_TestOpsA_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&=`. + * + * Calls `MR_CSharp_TestOpsA_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|=`. + * + * Calls `MR_CSharp_TestOpsA_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsA()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsA()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<=`. + * + * Calls `MR_CSharp_TestOpsA_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>=`. + * + * Calls `MR_CSharp_TestOpsA_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsA()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsA()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsA()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsA()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->*`. + * + * Calls `MR_CSharp_TestOpsA_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->`. + * + * Calls `MR_CSharp_TestOpsA_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator()`. + * + * Calls `MR_CSharp_TestOpsA_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator[]`. + * + * Calls `MR_CSharp_TestOpsA_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java new file mode 100644 index 00000000..f124dd0b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java @@ -0,0 +1,853 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsB::TestOpsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsB_ConstructFromAnother()`. + */ + public TestOpsB(mrbind_test.mr.csharp.TestOpsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsB_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsB()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsB()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsB()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsB()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsB()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsB()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsB()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsB()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsB()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsB()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsB()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsB()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsB()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsB()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+=`. + * + * Calls `MR_CSharp_TestOpsB_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-=`. + * + * Calls `MR_CSharp_TestOpsB_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*=`. + * + * Calls `MR_CSharp_TestOpsB_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/=`. + * + * Calls `MR_CSharp_TestOpsB_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%=`. + * + * Calls `MR_CSharp_TestOpsB_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^=`. + * + * Calls `MR_CSharp_TestOpsB_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&=`. + * + * Calls `MR_CSharp_TestOpsB_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|=`. + * + * Calls `MR_CSharp_TestOpsB_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsB()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsB()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<=`. + * + * Calls `MR_CSharp_TestOpsB_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>=`. + * + * Calls `MR_CSharp_TestOpsB_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsB()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsB()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsB()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsB()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->*`. + * + * Calls `MR_CSharp_TestOpsB_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->`. + * + * Calls `MR_CSharp_TestOpsB_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator()`. + * + * Calls `MR_CSharp_TestOpsB_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator[]`. + * + * Calls `MR_CSharp_TestOpsB_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java new file mode 100644 index 00000000..e8bb8dc8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java @@ -0,0 +1,841 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsC::TestOpsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsC_ConstructFromAnother()`. + */ + public TestOpsC(mrbind_test.mr.csharp.TestOpsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestOpsC assignFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestOpsC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsC()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsC()`. + */ + public void opSub() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsC()`. + */ + public void opMul() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsC()`. + */ + public void opBitand() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsC()`. + */ + public void opCompl() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsC()`. + */ + public void opNot() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * + * Calls `MR_CSharp_TestOpsC_assign()`. + */ + public void assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+=`. + * + * Calls `MR_CSharp_TestOpsC_add_assign()`. + */ + public void add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-=`. + * + * Calls `MR_CSharp_TestOpsC_sub_assign()`. + */ + public void sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*=`. + * + * Calls `MR_CSharp_TestOpsC_mul_assign()`. + */ + public void mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/=`. + * + * Calls `MR_CSharp_TestOpsC_div_assign()`. + */ + public void div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%=`. + * + * Calls `MR_CSharp_TestOpsC_mod_assign()`. + */ + public void mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^=`. + * + * Calls `MR_CSharp_TestOpsC_xor_assign()`. + */ + public void xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&=`. + * + * Calls `MR_CSharp_TestOpsC_bitand_assign()`. + */ + public void bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|=`. + * + * Calls `MR_CSharp_TestOpsC_bitor_assign()`. + */ + public void bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<=`. + * + * Calls `MR_CSharp_TestOpsC_lshift_assign()`. + */ + public void lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>=`. + * + * Calls `MR_CSharp_TestOpsC_rshift_assign()`. + */ + public void rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->*`. + * + * Calls `MR_CSharp_TestOpsC_arrow_star()`. + */ + public void arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->`. + * + * Calls `MR_CSharp_TestOpsC_arrow()`. + */ + public void arrow() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator()`. + * + * Calls `MR_CSharp_TestOpsC_call()`. + */ + public void call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator[]`. + * + * Calls `MR_CSharp_TestOpsC_index()`. + */ + public void index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java new file mode 100644 index 00000000..057a23cd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,492 @@ +package mrbind_test.mr.csharp; + +/** + * Test `std::function`. + * Generated from class `MR::CSharp::TestStdFunction`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestStdFunction extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestStdFunction(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestStdFunction::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestStdFunction_DefaultConstruct()`. + */ + public TestStdFunction() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::TestStdFunction` elementwise. + * The reference to the parameter `f1` might be preserved in the constructed object. + * The reference to the parameter `f2` might be preserved in the constructed object. + * The reference to the parameter `f3` might be preserved in the constructed object. + * The reference to the parameter `f4` might be preserved in the constructed object. + * The reference to the parameter `f5` might be preserved in the constructed object. + * The reference to the parameter `f6` might be preserved in the constructed object. + * The reference to the parameter `f7` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFrom()`. + */ + public TestStdFunction(mrbind_test.mr.cs.std_function_int32_t_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref f5, mrbind_test.mr.cs.std_function_int32_t_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + this(__ctor_constructFrom(f1, f2, f3, f4, f5, f6, f7), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.cs.std_function_int32_t_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref f5, mrbind_test.mr.cs.std_function_int32_t_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFrom.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f1, "f1"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f2, "f2"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f3, "f3"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f4, "f4"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f5, "f5"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f6, "f6"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f7, "f7")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(f1); + java.lang.ref.Reference.reachabilityFence(f2); + java.lang.ref.Reference.reachabilityFence(f3); + java.lang.ref.Reference.reachabilityFence(f4); + java.lang.ref.Reference.reachabilityFence(f5); + java.lang.ref.Reference.reachabilityFence(f6); + java.lang.ref.Reference.reachabilityFence(f7); + } + } + + /** + * Generated from constructor `MR::CSharp::TestStdFunction::TestStdFunction`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFromAnother()`. + */ + public TestStdFunction(mrbind_test.mr.csharp.TestStdFunction _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestStdFunction_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestStdFunction assignFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestStdFunction(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::Call`. + * + * Calls `MR_CSharp_TestStdFunction_Call()`. + */ + public void Call() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Call.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f1()`. + */ + public mrbind_test.mr.cs.std_function_int32_t_from_std_string f1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int32_t_from_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to the parameter `value` might be preserved in this object in element `f1`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f1()`. + */ + public void setF1(mrbind_test.mr.cs.std_function_int32_t_from_std_string value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f2()`. + */ + public mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t f2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to the parameter `value` might be preserved in this object in element `f2`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f2()`. + */ + public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f3()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to the parameter `value` might be preserved in this object in element `f3`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f3()`. + */ + public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f4()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to the parameter `value` might be preserved in this object in element `f4`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f4()`. + */ + public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f5()`. + */ + public mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref f5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to the parameter `value` might be preserved in this object in element `f5`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f5()`. + */ + public void setF5(mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f6()`. + */ + public mrbind_test.mr.cs.std_function_int32_t_rvalue_ref f6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int32_t_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to the parameter `value` might be preserved in this object in element `f6`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f6()`. + */ + public void setF6(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f7()`. + */ + public mrbind_test.mr.cs.std_function_void f7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to the parameter `value` might be preserved in this object in element `f7`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f7()`. + */ + public void setF7(mrbind_test.mr.cs.std_function_void value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java new file mode 100644 index 00000000..4d8aa3b6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Trivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Trivial_DefaultConstruct()`. + */ + public Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Trivial::Trivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public Trivial(mrbind_test.mr.csharp.Trivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Trivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Trivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java new file mode 100644 index 00000000..15667fd0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TrivialDerived_DefaultConstruct()`. + */ + public TrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TrivialDerived::TrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TrivialDerived_ConstructFromAnother()`. + */ + public TrivialDerived(mrbind_test.mr.csharp.TrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TrivialDerived assignFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java new file mode 100644 index 00000000..af4d7b2a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Af`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Af extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Af(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Af::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Af_DefaultConstruct()`. + */ + public Af() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Af::Af`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Af_ConstructFromAnother()`. + */ + public Af(mrbind_test.mr.customprefnames.Af _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Af::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Af_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Af assignFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Af(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java new file mode 100644 index 00000000..b278ab52 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Ai`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Ai extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Ai(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Ai::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Ai_DefaultConstruct()`. + */ + public Ai() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Ai::Ai`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Ai_ConstructFromAnother()`. + */ + public Ai(mrbind_test.mr.customprefnames.Ai _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Ai::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Ai_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Ai assignFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Ai(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java new file mode 100644 index 00000000..51b63a01 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.customprefnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CustomPrefNames::blah`. + * + * Calls `MR_CustomPrefNames_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java new file mode 100644 index 00000000..590b87e3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java @@ -0,0 +1,75 @@ +package mrbind_test.mr.declorder; + +/** + * Here all classes are whitelisted using `--expose-as-struct`. + * Generated from class `MR::DeclOrder::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"blah"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_blah = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("blah")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int blah() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah);} + public void setBlah(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah, value);} + + /** + * Generated from method `MR::DeclOrder::A::c`. + * + * Calls `MR_DeclOrder_A_c()`. + */ + public mrbind_test.mr.declorder.A_B c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_c.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.A_B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::d`. + * + * Calls `MR_DeclOrder_A_d()`. + */ + public mrbind_test.mr.declorder.A_E d() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_d.invokeExact(rawPointer()); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java new file mode 100644 index 00000000..aedf4a22 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java @@ -0,0 +1,74 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::A::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A::B");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A_B copy() {return new A_B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A_B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::A::B::a`. + * + * Calls `MR_DeclOrder_A_B_a()`. + */ + public mrbind_test.mr.declorder.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_a.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.A(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::B::b`. + * + * Calls `MR_DeclOrder_A_B_b()`. + */ + public mrbind_test.mr.declorder.A_E b() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_b.invokeExact(rawPointer()); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A_B() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_E.java new file mode 100644 index 00000000..c54b9f17 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.declorder; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java new file mode 100644 index 00000000..332fe584 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_false extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_false(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_false copy() {return new C_false(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_false other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_false_blah()`. + */ + public mrbind_test.mr.declorder.C_true blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_false_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.C_true(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_false() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java new file mode 100644 index 00000000..32f17bea --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_true extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_true(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_true copy() {return new C_true(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_true other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_true_blah()`. + */ + public mrbind_test.mr.declorder.C_false blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_true_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.C_false(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_true() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java new file mode 100644 index 00000000..a3e23774 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.deprecation; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Deprecation::foo`. + * + * Calls `MR_Deprecation_foo()`. + */ + @java.lang.Deprecated + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Deprecation::bar`. + * + * Calls `MR_Deprecation_bar()`. + */ + @java.lang.Deprecated + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_bar.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java new file mode 100644 index 00000000..5c898331 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * Generated from class `MR::IncludesForEnumConstants::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_MR_IncludesForEnumConstants_E_e1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_MR_IncludesForEnumConstants_E_e1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_MR_IncludesForEnumConstants_E_e1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct()`. + */ + public A_MR_IncludesForEnumConstants_E_e1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IncludesForEnumConstants::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother()`. + */ + public A_MR_IncludesForEnumConstants_E_e1(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IncludesForEnumConstants::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother()`. + */ + public mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 assignFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/E.java new file mode 100644 index 00000000..e3953a57 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java new file mode 100644 index 00000000..c06e887e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.includesforenumconstants; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Make sure that the `.cpp` implementation file includes the header for `E` correctly. + * Generated from function `MR::IncludesForEnumConstants::foo`. + * + * Calls `MR_IncludesForEnumConstants_foo()`. + */ + public static mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants.H0.MR_IncludesForEnumConstants_foo.invokeExact(); + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/E.java new file mode 100644 index 00000000..aaf1a2cd --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/E.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** + * Can't use an opaque struct as an array element, because, well, it's opaque. But a enum should work. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java new file mode 100644 index 00000000..64159806 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -0,0 +1,42 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IncompleteArrayElemType::bar`. + * + * Calls `MR_IncompleteArrayElemType_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public static void bar(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types_2.H0.MR_IncompleteArrayElemType_bar.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::IncompleteArrayElemType::foo`. + * + * Calls `MR_IncompleteArrayElemType_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public static void foo(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types.H0.MR_IncompleteArrayElemType_foo.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java new file mode 100644 index 00000000..f2202f59 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.iostream; + +/** + * Generated from class `MR::IOStream::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IOStream_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IOStream::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IOStream_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.iostream.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IOStream::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IOStream_A_AssignFromAnother()`. + */ + public mrbind_test.mr.iostream.A assignFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.iostream.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java new file mode 100644 index 00000000..5e65e057 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.iostream; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IOStream::operator<<`. + * + * Calls `MR_C_print_MR_IOStream_A()`. + */ + public static void opLshift(mrbind_test.mr.cs.std_ostream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_print_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::IOStream::operator>>`. + * + * Calls `MR_C_input_MR_IOStream_A()`. + */ + public static void opRshift(mrbind_test.mr.cs.std_istream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_input_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java new file mode 100644 index 00000000..b75d1808 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java @@ -0,0 +1,216 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::A` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.lifetimeinference.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_A_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.A assignFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::begin`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_LifetimeInference_A_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::end`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_LifetimeInference_A_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_LifetimeInference_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..31c4487f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::B` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_B_ConstructFrom()`. + */ + public B(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.lifetimeinference.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_B_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.B assignFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::B` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_B_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::B` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_LifetimeInference_B_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java new file mode 100644 index 00000000..bc33fc14 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.lifetimeinference.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * + * Calls `MR_LifetimeInference_C_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public C(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + this(__ctor_construct(_1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::LifetimeInference::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_C_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.C assignFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java new file mode 100644 index 00000000..015a9991 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -0,0 +1,100 @@ +package mrbind_test.mr.lifetimeinference; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::LifetimeInference::begin`. + * The reference to the parameter `a` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * The reference to the parameter `a` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::begin`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * The reference to the parameter `b` might be preserved in the return value. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java new file mode 100644 index 00000000..b6a0e2ff --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,97 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"a", "b", "c", "ll", "arr", "arr2d"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_INT))}); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_c = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("c")); + public static final long OFF_ll = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ll")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_arr2d = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr2d")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 120, 8, "MR::MatchingLayout::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + /** + * first + */ + public int a() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a);} + public void setA(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a, value);} + + /** + * second + */ + public short b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b);} + public void setB(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b, value);} + + /** + * third + */ + public float c() {return segment.get(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c);} + public void setC(float value) {segment.set(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c, value);} + + public long ll() {return segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, OFF_ll);} + public void setLl(long value) {segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, OFF_ll, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public int arr2d(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4);} + public void setArr2d(int i0, int i1, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4, value);} + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Returns a pointer to a member variable of class `MR::MatchingLayout::A` named `x`. + * + * Calls `MR_MatchingLayout_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Modifies a member variable of class `MR::MatchingLayout::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_MatchingLayout_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java new file mode 100644 index 00000000..984fe8fe --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java @@ -0,0 +1,58 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "a", "y"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, mrbind_test.mr.matchinglayout.A.LAYOUT, java.lang.foreign.ValueLayout.JAVA_BYTE}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 136, 8, "MR::MatchingLayout::B");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public B copy() {return new B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + public mrbind_test.mr.matchinglayout.A a() {return new mrbind_test.mr.matchinglayout.A(segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.matchinglayout.A value) {segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + public byte y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y);} + public void setY(byte value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y, value);} + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_MatchingLayout_B_DefaultConstruct()`. + */ + public B() + { + super(__ctor_defaultConstruct(), null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_B_DefaultConstruct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java new file mode 100644 index 00000000..2f538576 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java @@ -0,0 +1,91 @@ +package mrbind_test.mr.matchinglayout; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::MatchingLayout::foo`. + * + * Calls `MR_MatchingLayout_foo()`. + */ + public static mrbind_test.mr.matchinglayout.B foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_foo.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.matchinglayout.B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::MatchingLayout::bar`. + * + * Calls `MR_MatchingLayout_bar()`. + */ + public static void bar(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::baz`. + * + * Calls `MR_MatchingLayout_baz()`. + */ + public static void baz(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_baz.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::bleh`. + * + * Calls `MR_MatchingLayout_bleh()`. + */ + public static mrbind_test.mr.matchinglayout.B bleh(mrbind_test.mr.matchinglayout.B _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bleh.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.matchinglayout.B(__ret.reinterpret(mrbind_test.mr.matchinglayout.B.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java new file mode 100644 index 00000000..4facb3df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,241 @@ +package mrbind_test.mr.membervars; + +/** + * Generated from class `MR::MemberVars::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::MemberVars::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_MemberVars_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.membervars.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.membervars.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `z`. + * + * Calls `MR_MemberVars_A_Get_z()`. + */ + public static int z() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `z`. + * The reference to the parameter `value` might be preserved in this object in element `z`. + * + * Calls `MR_MemberVars_A_Set_z()`. + */ + public static void setZ(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `w`. + * + * Calls `MR_MemberVars_A_Get_w()`. + */ + public static int w() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_MemberVars_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_y()`. + */ + public int y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Those don't get setters, and also get only one (non-const-propagating) getter. + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Arrays don't get setters, because they aren't assignable. But they still get mutable getters + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::MemberVars::A` named `arr`. The size is `4`. + * + * Calls `MR_MemberVars_A_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java new file mode 100644 index 00000000..1c1b2d3f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * Generated from class `MR::NestedTemplateInst::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int32_t_DefaultConstruct()`. + */ + public A_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int32_t_ConstructFromAnother()`. + */ + public A_int32_t(mrbind_test.mr.nestedtemplateinst.A_int32_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int32_t_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int32_t assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java new file mode 100644 index 00000000..994ae19f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * This struct needs special care to be instantiated, even with the typedef below. Hmm. + * Generated from class `MR::NestedTemplateInst::A::AA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int32_t_AA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int32_t_AA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int32_t_AA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int32_t_AA_float_DefaultConstruct()`. + */ + public A_int32_t_AA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::AA::AA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int32_t_AA_float_ConstructFromAnother()`. + */ + public A_int32_t_AA_float(mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::AA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int32_t_AA_float_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java new file mode 100644 index 00000000..ed188cce --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,222 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::NestedTypes::A` elementwise. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `e` might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFrom()`. + */ + public A(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + this(__ctor_constructFrom(b, e), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b"), java.util.Objects.requireNonNull(e, "e").value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.nestedtypes.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A assignFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_b()`. + */ + public mrbind_test.mr.nestedtypes.A_B b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_NestedTypes_A_Set_b()`. + */ + public void setB(mrbind_test.mr.nestedtypes.A_B value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_e()`. + */ + public mrbind_test.mr.nestedtypes.A_E e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_NestedTypes_A_Set_e()`. + */ + public void setE(mrbind_test.mr.nestedtypes.A_E value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java new file mode 100644 index 00000000..0daf7010 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_B_DefaultConstruct()`. + */ + public A_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_B_ConstructFromAnother()`. + */ + public A_B(mrbind_test.mr.nestedtypes.A_B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_B_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A_B assignFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_E.java new file mode 100644 index 00000000..ba6e21dc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.nestedtypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java new file mode 100644 index 00000000..0e2c9e45 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_float_DefaultConstruct()`. + */ + public A_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_ConstructFromAnother()`. + */ + public A_float(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_float assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java new file mode 100644 index 00000000..97a21727 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_int32_t_DefaultConstruct()`. + */ + public A_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_int32_t_ConstructFromAnother()`. + */ + public A_int32_t(mrbind_test.mr.omittingtargsandquals.A_int32_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_int32_t_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_int32_t assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_int32_t()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator-`. + * + * Calls `MR_C_sub_MR_OmittingTargsAndQuals_A_int32_t_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opSub(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_sub_MR_OmittingTargsAndQuals_A_int32_t_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java new file mode 100644 index 00000000..c40dc7ba --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int32_t()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::b`. + * + * Calls `MR_OmittingTargsAndQuals_b()`. + */ + public static void b(mrbind_test.mr.omittingtargsandquals.A_int32_t _1, mrbind_test.mr.omittingtargsandquals.A_float _2) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_b.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator*`. + * + * Calls `MR_C_deref_MR_OmittingTargsAndQuals_A_int32_t()`. + */ + public static void opMul(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_deref_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator~`. + * + * Calls `MR_C_compl_MR_OmittingTargsAndQuals_A_int32_t()`. + */ + public static void opCompl(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_compl_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::c`. + * + * Calls `MR_OmittingTargsAndQuals_c()`. + */ + public static void c(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_c.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::d`. + * + * Calls `MR_OmittingTargsAndQuals_d()`. + */ + public static void d(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_d.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::inst`. + * + * Calls `MR_OmittingTargsAndQuals_inst()`. + */ + public static void inst() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_inst.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java new file mode 100644 index 00000000..bb6e1211 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java @@ -0,0 +1,1103 @@ +package mrbind_test.mr.overloadedops; + +/** + * Member functions. + * Generated from class `MR::OverloadedOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Since we have a custom assignment, we also need a custom copy ctor to avoid the deprecation warning. + * Generated from constructor `MR::OverloadedOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.overloadedops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Assign. + * Generated from method `MR::OverloadedOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_A_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Unary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_A()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_A()`. + */ + public int opAdd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Unary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_A()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_A()`. + */ + public int opSub(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Dereference (unary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_OverloadedOps_A()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Multiply (binary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_A()`. + */ + public int opMul(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide. + * Generated from method `MR::OverloadedOps::A::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_A()`. + */ + public int opDiv(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo. + * Generated from method `MR::OverloadedOps::A::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_A()`. + */ + public int opMod(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor. + * Generated from method `MR::OverloadedOps::A::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_A()`. + */ + public int opXor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and. + * Generated from method `MR::OverloadedOps::A::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_A()`. + */ + public int opBitand(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or. + * Generated from method `MR::OverloadedOps::A::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_A()`. + */ + public int opBitor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit negate. + * Generated from method `MR::OverloadedOps::A::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_A()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Boolean negate. + * Generated from method `MR::OverloadedOps::A::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_A()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Less. + * Generated from method `MR::OverloadedOps::A::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_A()`. + */ + public int opLess(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater. + * Generated from method `MR::OverloadedOps::A::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_A()`. + */ + public int opGreater(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Plus assign. + * Generated from method `MR::OverloadedOps::A::operator+=`. + * + * Calls `MR_OverloadedOps_A_add_assign()`. + */ + public int add_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Minus assign. + * Generated from method `MR::OverloadedOps::A::operator-=`. + * + * Calls `MR_OverloadedOps_A_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply assign. + * Generated from method `MR::OverloadedOps::A::operator*=`. + * + * Calls `MR_OverloadedOps_A_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide assign. + * Generated from method `MR::OverloadedOps::A::operator/=`. + * + * Calls `MR_OverloadedOps_A_div_assign()`. + */ + public int div_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo assign. + * Generated from method `MR::OverloadedOps::A::operator%=`. + * + * Calls `MR_OverloadedOps_A_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor assign. + * Generated from method `MR::OverloadedOps::A::operator^=`. + * + * Calls `MR_OverloadedOps_A_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and assign. + * Generated from method `MR::OverloadedOps::A::operator&=`. + * + * Calls `MR_OverloadedOps_A_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or assign. + * Generated from method `MR::OverloadedOps::A::operator|=`. + * + * Calls `MR_OverloadedOps_A_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift. + * Generated from method `MR::OverloadedOps::A::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_A()`. + */ + public int opLshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift. + * Generated from method `MR::OverloadedOps::A::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_A()`. + */ + public int opRshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift assign. + * Generated from method `MR::OverloadedOps::A::operator<<=`. + * + * Calls `MR_OverloadedOps_A_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift assign. + * Generated from method `MR::OverloadedOps::A::operator>>=`. + * + * Calls `MR_OverloadedOps_A_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Equal. + * Generated from method `MR::OverloadedOps::A::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_A()`. + */ + public int opEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Not equal. + * Generated from method `MR::OverloadedOps::A::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_A()`. + */ + public int opNotEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Less equal. + * Generated from method `MR::OverloadedOps::A::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_A()`. + */ + public int opLessEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater equal. + * Generated from method `MR::OverloadedOps::A::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_A()`. + */ + public int opGreaterEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Compare three way. + * Generated from method `MR::OverloadedOps::A::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_A()`. + */ + public int opCompareThreeWay(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And. + * Generated from method `MR::OverloadedOps::A::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_A()`. + */ + public int opAnd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Or. + * Generated from method `MR::OverloadedOps::A::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_A()`. + */ + public int opOr(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_A()`. + */ + public int opIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_A()`. + */ + public int opPostIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Pre-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_A()`. + */ + public int opDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_A()`. + */ + public int opPostDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Comma. + * Generated from method `MR::OverloadedOps::A::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_A()`. + */ + public int opComma(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow star. + * Generated from method `MR::OverloadedOps::A::operator->*`. + * + * Calls `MR_OverloadedOps_A_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow. + * Generated from method `MR::OverloadedOps::A::operator->`. + * + * Calls `MR_OverloadedOps_A_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Function call. + * Generated from method `MR::OverloadedOps::A::operator()`. + * + * Calls `MR_OverloadedOps_A_call()`. + */ + public int call(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Indexing. + * Generated from method `MR::OverloadedOps::A::operator[]`. + * + * Calls `MR_OverloadedOps_A_index()`. + */ + public int index(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java new file mode 100644 index 00000000..9bc5b847 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.overloadedops; + +/** + * Free functions. + * Generated from class `MR::OverloadedOps::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.overloadedops.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_B_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.B assignFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java new file mode 100644 index 00000000..ef8a98ab --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.overloadedops; + +/** + * Test how the names are generated. + * Generated from class `MR::OverloadedOps::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.overloadedops.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_C_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.C assignFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java new file mode 100644 index 00000000..ef371406 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.overloadedops; + +/** + * Generated from class `MR::OverloadedOps::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.overloadedops.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_D_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.D assignFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Disambiguating the names. + * Generated from method `MR::OverloadedOps::D::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator*`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_C_deref_const_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_const_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java new file mode 100644 index 00000000..f97f866a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java @@ -0,0 +1,1052 @@ +package mrbind_test.mr.overloadedops; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Unary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Unary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Dereference (unary star). + * Generated from function `MR::OverloadedOps::operator*`. + * The reference to the parameter `_1` might be preserved in the return value. + * + * Calls `MR_C_deref_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply (binary star). + * Generated from function `MR::OverloadedOps::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide. + * Generated from function `MR::OverloadedOps::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_B()`. + */ + public static int opDiv(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo. + * Generated from function `MR::OverloadedOps::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_B()`. + */ + public static int opMod(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor. + * Generated from function `MR::OverloadedOps::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_B()`. + */ + public static int opXor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and. + * Generated from function `MR::OverloadedOps::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_B()`. + */ + public static int opBitand(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or. + * Generated from function `MR::OverloadedOps::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_B()`. + */ + public static int opBitor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit negate. + * Generated from function `MR::OverloadedOps::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_B()`. + */ + public static int opCompl(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Boolean negate. + * Generated from function `MR::OverloadedOps::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_B()`. + */ + public static int opNot(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Assign. + * friend int operator=(B, B); // Can't be a free function. + * Less. + * Generated from function `MR::OverloadedOps::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_B()`. + */ + public static int opLess(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater. + * Generated from function `MR::OverloadedOps::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_B()`. + */ + public static int opGreater(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Plus assign. + * Generated from function `MR::OverloadedOps::operator+=`. + * + * Calls `MR_C_add_assign_MR_OverloadedOps_B()`. + */ + public static int opAddAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Minus assign. + * Generated from function `MR::OverloadedOps::operator-=`. + * + * Calls `MR_C_sub_assign_MR_OverloadedOps_B()`. + */ + public static int opSubAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Multiply assign. + * Generated from function `MR::OverloadedOps::operator*=`. + * + * Calls `MR_C_mul_assign_MR_OverloadedOps_B()`. + */ + public static int opMulAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide assign. + * Generated from function `MR::OverloadedOps::operator/=`. + * + * Calls `MR_C_div_assign_MR_OverloadedOps_B()`. + */ + public static int opDivAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo assign. + * Generated from function `MR::OverloadedOps::operator%=`. + * + * Calls `MR_C_mod_assign_MR_OverloadedOps_B()`. + */ + public static int opModAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor assign. + * Generated from function `MR::OverloadedOps::operator^=`. + * + * Calls `MR_C_xor_assign_MR_OverloadedOps_B()`. + */ + public static int opXorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and assign. + * Generated from function `MR::OverloadedOps::operator&=`. + * + * Calls `MR_C_bitand_assign_MR_OverloadedOps_B()`. + */ + public static int opBitandAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or assign. + * Generated from function `MR::OverloadedOps::operator|=`. + * + * Calls `MR_C_bitor_assign_MR_OverloadedOps_B()`. + */ + public static int opBitorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift. + * Generated from function `MR::OverloadedOps::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_B()`. + */ + public static int opLshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift. + * Generated from function `MR::OverloadedOps::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_B()`. + */ + public static int opRshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift assign. + * Generated from function `MR::OverloadedOps::operator<<=`. + * + * Calls `MR_C_lshift_assign_MR_OverloadedOps_B()`. + */ + public static int opLshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift assign. + * Generated from function `MR::OverloadedOps::operator>>=`. + * + * Calls `MR_C_rshift_assign_MR_OverloadedOps_B()`. + */ + public static int opRshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Equal. + * Generated from function `MR::OverloadedOps::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_B()`. + */ + public static int opEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Not equal. + * Generated from function `MR::OverloadedOps::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_B()`. + */ + public static int opNotEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Less equal. + * Generated from function `MR::OverloadedOps::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_B()`. + */ + public static int opLessEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater equal. + * Generated from function `MR::OverloadedOps::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_B()`. + */ + public static int opGreaterEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Compare three way. + * Generated from function `MR::OverloadedOps::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_B()`. + */ + public static int opCompareThreeWay(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * And. + * Generated from function `MR::OverloadedOps::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_B()`. + */ + public static int opAnd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Or. + * Generated from function `MR::OverloadedOps::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_B()`. + */ + public static int opOr(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Pre-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_B()`. + */ + public static int opIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_B()`. + */ + public static int opPostIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_B()`. + */ + public static int opDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_B()`. + */ + public static int opPostDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Comma. + * Generated from function `MR::OverloadedOps::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_B()`. + */ + public static int opComma(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Arrow star. + * Generated from function `MR::OverloadedOps::operator->*`. + * + * Calls `MR_C_arrow_star_MR_OverloadedOps_B()`. + */ + public static int opArrowStar(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_arrow_star_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * If rhs type is same as the lhs one (ignoring cvref), it's not emitted. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.C _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * But different types are printed. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_const_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_const_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_const_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java new file mode 100644 index 00000000..4d5fc48d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.overloads; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_1()`. + */ + public static void a(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_1.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_2()`. + */ + public static void a(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_2.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_int32_t()`. + */ + public static void b_int32_t() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_int32_t.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_float()`. + */ + public static void b_float() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_float.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_int32_t()`. + */ + public static void c(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_int32_t.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_float()`. + */ + public static void c(float _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_float.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_int32_t()`. + */ + public static void d(byte _1, int _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_int32_t.invokeExact(_1, _2, _3); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_float()`. + */ + public static void d(byte _1, float _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_float.invokeExact(_1, _2, _3); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_const_int32_t_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e(int _1, java.lang.foreign.MemorySegment _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_const_int32_t_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int32_t_rvalue_ref_int32_t()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int32_t_rvalue_ref_int32_t(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int32_t_rvalue_ref_int32_t.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int32_t_rvalue_ref_float()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int32_t_rvalue_ref_float(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int32_t_rvalue_ref_float.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This is a fun testcase. Here we must not omit cvref on the first parameter, even if it partially helps with disambiguation, + * because that ultimately leads to an ambiguity. + * So we can only omit cvref if each function has cvref in that parameter). + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_float()`. + */ + public static void f(float _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_float.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_int32_t_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void f(java.lang.foreign.MemorySegment _1, float _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_int32_t_rvalue_ref.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_const_int32_t_ref()`. + */ + public static void f(int _1, float _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_const_int32_t_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java new file mode 100644 index 00000000..0a917cab --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java @@ -0,0 +1,260 @@ +package mrbind_test.mr.phmap; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_set_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_set_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_map_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_set_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_set_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_map_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_map_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_set_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_map_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_set_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_map_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_set_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_set_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_map_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_map_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multiset_int32_t()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multiset_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multiset_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multimap_int32_t_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multimap_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multimap_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java new file mode 100644 index 00000000..56cc1825 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.signaturefilters.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_A_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.A assignFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java new file mode 100644 index 00000000..eed467cb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::Blah`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Blah extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Blah(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Blah::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_Blah_DefaultConstruct()`. + */ + public Blah() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::Blah::Blah`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_Blah_ConstructFromAnother()`. + */ + public Blah(mrbind_test.mr.signaturefilters.Blah _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::Blah::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_Blah_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.Blah assignFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.Blah(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_SignatureFilters_Blah_Get_a()`. + */ + public mrbind_test.mr.signaturefilters.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_SignatureFilters_Blah_Set_a()`. + */ + public void setA(mrbind_test.mr.signaturefilters.A value) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java new file mode 100644 index 00000000..885d08b0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java @@ -0,0 +1,207 @@ +package mrbind_test.mr.signaturefilters; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_1()`. + */ + public static void foo(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_0.invokeExact(); + return new mrbind_test.mr.signaturefilters.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_1()`. + */ + public static void foo2(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_1()`. + */ + public static void foo3(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_1()`. + */ + public static void foo4(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_1()`. + */ + public static void foo5(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java new file mode 100644 index 00000000..85ac31fb --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,154 @@ +package mrbind_test.mr.staticfuncs; + +/** + * Generated from class `MR::StaticFuncs::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StaticFuncs_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StaticFuncs::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StaticFuncs_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.staticfuncs.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StaticFuncs_A_AssignFromAnother()`. + */ + public mrbind_test.mr.staticfuncs.A assignFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.staticfuncs.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::blah`. + * + * Calls `MR_StaticFuncs_A_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StaticFuncs::A` named `x`. + * + * Calls `MR_StaticFuncs_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::StaticFuncs::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_StaticFuncs_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java new file mode 100644 index 00000000..3f7589f4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdcontainers; + +/** + * `std::array` behaves differently with simple types. + * Generated from class `MR::StdContainers::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdcontainers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.A assignFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java new file mode 100644 index 00000000..a4852da4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java @@ -0,0 +1,744 @@ +package mrbind_test.mr.stdcontainers; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdContainers::Set`. + * + * Calls `MR_StdContainers_Set()`. + */ + public static void Set(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Set.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::SetWithDefault`. + * + * Calls `MR_StdContainers_SetWithDefault()`. + */ + public static void SetWithDefault(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_SetWithDefault.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::Get`. + * + * Calls `MR_StdContainers_Get()`. + */ + public static mrbind_test.mr.cs.std_vector_int32_t Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Get.invokeExact(); + return new mrbind_test.mr.cs.std_vector_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToRef`. + * + * Calls `MR_StdContainers_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToPtr`. + * + * Calls `MR_StdContainers_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRef`. + * + * Calls `MR_StdContainers_ConstRef()`. + */ + public static void ConstRef(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::RvalueRef`. + * + * Calls `MR_StdContainers_RvalueRef()`. + */ + public static void RvalueRef(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_RvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRvalueRef`. + * + * Calls `MR_StdContainers_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(mrbind_test.mr.cs.std_vector_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Just the list of other containers. + * Generated from function `MR::StdContainers::GetDeque`. + * + * Calls `MR_StdContainers_GetDeque()`. + */ + public static mrbind_test.mr.cs.std_deque_int32_t GetDeque() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDeque.invokeExact(); + return new mrbind_test.mr.cs.std_deque_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetList`. + * + * Calls `MR_StdContainers_GetList()`. + */ + public static mrbind_test.mr.cs.std_list_int32_t GetList() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetList.invokeExact(); + return new mrbind_test.mr.cs.std_list_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSet`. + * + * Calls `MR_StdContainers_GetSet()`. + */ + public static mrbind_test.mr.cs.std_set_int32_t GetSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSet.invokeExact(); + return new mrbind_test.mr.cs.std_set_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSet`. + * + * Calls `MR_StdContainers_GetMultiSet()`. + */ + public static mrbind_test.mr.cs.std_multiset_int32_t GetMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSet.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSet`. + * + * Calls `MR_StdContainers_GetUnorderedSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_int32_t GetUnorderedSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSet.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_set_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSet`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_int32_t GetUnorderedMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSet.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multiset_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMap`. + * + * Calls `MR_StdContainers_GetMap()`. + */ + public static mrbind_test.mr.cs.std_map_int32_t_float GetMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMap.invokeExact(); + return new mrbind_test.mr.cs.std_map_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMap`. + * + * Calls `MR_StdContainers_GetMultiMap()`. + */ + public static mrbind_test.mr.cs.std_multimap_int32_t_float GetMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMap.invokeExact(); + return new mrbind_test.mr.cs.std_multimap_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMap`. + * + * Calls `MR_StdContainers_GetUnorderedMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_int32_t_float GetUnorderedMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMap.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_map_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMap`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_int32_t_float GetUnorderedMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMap.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArray`. + * + * Calls `MR_StdContainers_GetStdArray()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 GetStdArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArray.invokeExact(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_A_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArraySimple`. + * + * Calls `MR_StdContainers_GetStdArraySimple()`. + */ + public static mrbind_test.mr.cs.std_array_int32_t_43 GetStdArraySimple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArraySimple.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.cs.std_array_int32_t_43(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The custom simple array needs a bit more testing: + * Generated from function `MR::StdContainers::StdArraySimpleParam`. + * + * Calls `MR_StdContainers_StdArraySimpleParam()`. + */ + public static void StdArraySimpleParam(mrbind_test.mr.cs.std_array_int32_t_43 _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimpleParam.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::StdArraySimplePtr`. + * + * Calls `MR_StdContainers_StdArraySimplePtr()`. + */ + public static mrbind_test.mr.cs.std_array_int32_t_43 StdArraySimplePtr(mrbind_test.mr.cs.std_array_int32_t_43 param) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimplePtr.invokeExact(mrbind_test.Ffi.ptr(param)); + java.lang.Object __owner = param; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_array_int32_t_43(__ret.reinterpret(mrbind_test.mr.cs.std_array_int32_t_43.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(param); + } + } + + /** + * For this `std::multiset` specialization, mention all iterators so that they get merged. + * Generated from function `MR::StdContainers::GetMultiSetWithMergedIters`. + * + * Calls `MR_StdContainers_GetMultiSetWithMergedIters()`. + */ + public static mrbind_test.mr.cs.std_multiset_float GetMultiSetWithMergedIters() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetWithMergedIters.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIter`. + * + * Calls `MR_StdContainers_GetMergedIter()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIter() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIter.invokeExact(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIterConst`. + * + * Calls `MR_StdContainers_GetMergedIterConst()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIterConst() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIterConst.invokeExact(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::NonDefCon`. + * + * Calls `MR_StdContainers_NonDefCon()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible NonDefCon() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefCon.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetVectorNA`. + * + * Calls `MR_StdContainers_GetVectorNA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable GetVectorNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetVectorNA.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetDequeNA`. + * + * Calls `MR_StdContainers_GetDequeNA()`. + */ + public static mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable GetDequeNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDequeNA.invokeExact(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetListNA`. + * + * Calls `MR_StdContainers_GetListNA()`. + */ + public static mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable GetListNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetListNA.invokeExact(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSetNA`. + * + * Calls `MR_StdContainers_GetSetNA()`. + */ + public static mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable GetSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSetNA`. + * + * Calls `MR_StdContainers_GetMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable GetMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable GetUnorderedSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable GetUnorderedMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMapNA`. + * + * Calls `MR_StdContainers_GetMapNA()`. + */ + public static mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float GetMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMapNA`. + * + * Calls `MR_StdContainers_GetMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float GetMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float GetUnorderedMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float GetUnorderedMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArrayNA`. + * + * Calls `MR_StdContainers_GetStdArrayNA()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42 GetStdArrayNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayNA.invokeExact(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Fun stuff! + * The type name is a bit weird for this, but at least it works. + * Generated from function `MR::StdContainers::GetStdArrayOfPlainArray`. + * + * Calls `MR_StdContainers_GetStdArrayOfPlainArray()`. + */ + public static mrbind_test.mr.cs.std_array_int32_t_array_4_array_3_5 GetStdArrayOfPlainArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayOfPlainArray.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.cs.std_array_int32_t_array_4_array_3_5(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java new file mode 100644 index 00000000..4a0a4140 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.stdcontainers; + +/** + * A non-assignable type? + * Generated from class `MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonAssignable::NonAssignable`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public NonAssignable(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator<`. + * + * Calls `MR_C_less_MR_StdContainers_NonAssignable()`. + */ + public boolean opLess(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_less_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator==`. + * + * Calls `MR_C_equal_MR_StdContainers_NonAssignable()`. + */ + public boolean opEqual(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_equal_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java new file mode 100644 index 00000000..b3efb8e0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdcontainers; + +/** + * Test vectors of a non-default-constructible type. + * Generated from class `MR::StdContainers::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * + * Calls `MR_StdContainers_NonDefaultConstructible_Construct()`. + */ + public NonDefaultConstructible(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::StdContainers::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible assignFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java new file mode 100644 index 00000000..bb7781e0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java @@ -0,0 +1,230 @@ +package mrbind_test.mr.stdexpected; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdExpected::GetExp`. + * + * Calls `MR_StdExpected_GetExp()`. + */ + public static mrbind_test.mr.cs.expected_int32_t_std_string GetExp() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExp.invokeExact(); + return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExp`. + * + * Calls `MR_StdExpected_SetExp()`. + */ + public static void SetExp(mrbind_test.mr.cs.expected_int32_t_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExp.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpConstRef`. + * + * Calls `MR_StdExpected_SetExpConstRef()`. + */ + public static void SetExpConstRef(mrbind_test.mr.cs.expected_int32_t_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDefTrivial`. + * + * Calls `MR_StdExpected_SetExpDefTrivial()`. + */ + public static void SetExpDefTrivial(mrbind_test.mr.cs.expected_int32_t_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDef`. + * + * Calls `MR_StdExpected_SetExpDef()`. + */ + public static void SetExpDef(mrbind_test.mr.cs.expected_int32_t_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVoid`. + * + * Calls `MR_StdExpected_GetExpVoid()`. + */ + public static mrbind_test.mr.cs.expected_void_float GetExpVoid() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVoid.invokeExact(); + return new mrbind_test.mr.cs.expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoid`. + * + * Calls `MR_StdExpected_SetExpVoid()`. + */ + public static void SetExpVoid(mrbind_test.mr.cs.expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoid.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidConstRef`. + * + * Calls `MR_StdExpected_SetExpVoidConstRef()`. + */ + public static void SetExpVoidConstRef(mrbind_test.mr.cs.expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDefTrivial`. + * + * Calls `MR_StdExpected_SetExpVoidDefTrivial()`. + */ + public static void SetExpVoidDefTrivial(mrbind_test.mr.cs.expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDefTrivial.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDef`. + * + * Calls `MR_StdExpected_SetExpVoidDef()`. + */ + public static void SetExpVoidDef(mrbind_test.mr.cs.expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVec`. + * + * Calls `MR_StdExpected_GetExpVec()`. + */ + public static mrbind_test.mr.cs.std_vector_expected_int32_t_std_string GetExpVec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVec.invokeExact(); + return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java new file mode 100644 index 00000000..96057460 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -0,0 +1,98 @@ +package mrbind_test.mr.stdfilesystem; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFilesystem::GetPath`. + * + * Calls `MR_StdFilesystem_GetPath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path GetPath() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_GetPath.invokeExact(); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPath`. + * + * Calls `MR_StdFilesystem_SetPath()`. + */ + public static void SetPath(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPath.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathConstRef`. + * + * Calls `MR_StdFilesystem_SetPathConstRef()`. + */ + public static void SetPathConstRef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathConstRef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDefTrivial`. + * + * Calls `MR_StdFilesystem_SetPathDefTrivial()`. + */ + public static void SetPathDefTrivial(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDefTrivial.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDef`. + * + * Calls `MR_StdFilesystem_SetPathDef()`. + */ + public static void SetPathDef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java new file mode 100644 index 00000000..12efd32a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.stdfunction; + +/** + * Generated from class `MR::StdFunction::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdFunction_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdFunction::A` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFrom()`. + */ + public A(java.lang.String a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String a) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFrom.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdFunction::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdfunction.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdFunction::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdFunction_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdfunction.A assignFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdfunction.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdFunction::A` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdFunction_A_Get_a()`. + */ + public mrbind_test.mr.cs.std_string a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdFunction::A` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_StdFunction_A_Set_a()`. + */ + public void setA(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/E.java new file mode 100644 index 00000000..bd6df766 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.stdfunction; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java new file mode 100644 index 00000000..e4793da5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.stdfunction; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int32_t_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int32_t_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_int32_t_int32_t()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_int32_t_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int32_t_func_from_int32_t_int32_t()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int32_t_func_from_int32_t_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int32_t_MR_StdFunction_E()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int32_t_MR_StdFunction_E.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_std_string_func_from_int32_t_float()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_std_string_from_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_std_string_func_from_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_std_string()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_std_string.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_A_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_A_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java new file mode 100644 index 00000000..5b1d7a35 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::A` elementwise. + * The reference to the parameter `x` might be preserved in the constructed object. + * + * Calls `MR_StdOptional_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdoptional.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_StdOptional_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..290a2da7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::B` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFrom()`. + */ + public B(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.stdoptional.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_B_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::B` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_B_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::B` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_StdOptional_B_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/E.java new file mode 100644 index 00000000..8049e526 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.stdoptional; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java new file mode 100644 index 00000000..9ad9b7c4 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java @@ -0,0 +1,392 @@ +package mrbind_test.mr.stdoptional; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdOptional::GetInt`. + * + * Calls `MR_StdOptional_GetInt()`. + */ + public static mrbind_test.mr.cs.std_optional_int32_t GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetInt.invokeExact(); + return new mrbind_test.mr.cs.std_optional_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetInt`. + * + * Calls `MR_StdOptional_SetInt()`. + */ + public static void SetInt(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetInt.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntConstRef`. + * + * Calls `MR_StdOptional_SetIntConstRef()`. + */ + public static void SetIntConstRef(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDefTrivial`. + * + * Calls `MR_StdOptional_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDef`. + * + * Calls `MR_StdOptional_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_optional_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetEnum`. + * + * Calls `MR_StdOptional_GetEnum()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_E GetEnum() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetEnum.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnum`. + * + * Calls `MR_StdOptional_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnum.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumConstRef`. + * + * Calls `MR_StdOptional_SetEnumConstRef()`. + */ + public static void SetEnumConstRef(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDefTrivial`. + * + * Calls `MR_StdOptional_SetEnumDefTrivial()`. + */ + public static void SetEnumDefTrivial(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDef`. + * + * Calls `MR_StdOptional_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass`. + * + * Calls `MR_StdOptional_GetClass()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass`. + * + * Calls `MR_StdOptional_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassConstRef`. + * + * Calls `MR_StdOptional_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDefTrivial`. + * + * Calls `MR_StdOptional_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDefTrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDef`. + * + * Calls `MR_StdOptional_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass2`. + * + * Calls `MR_StdOptional_GetClass2()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_B GetClass2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass2.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_B(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2`. + * + * Calls `MR_StdOptional_SetClass2()`. + */ + public static void SetClass2(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2ConstRef`. + * + * Calls `MR_StdOptional_SetClass2ConstRef()`. + */ + public static void SetClass2ConstRef(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2ConstRef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2DefTrivial`. + * + * Calls `MR_StdOptional_SetClass2DefTrivial()`. + */ + public static void SetClass2DefTrivial(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2Def`. + * + * Calls `MR_StdOptional_SetClass2Def()`. + */ + public static void SetClass2Def(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java new file mode 100644 index 00000000..28b7fcc2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdsharedptr; + +/** + * Now with a class: + * Generated from class `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdSharedPtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdsharedptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdSharedPtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdsharedptr.A assignFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java new file mode 100644 index 00000000..6e0b8e8a --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -0,0 +1,814 @@ +package mrbind_test.mr.stdsharedptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdSharedPtr::GetInt`. + * + * Calls `MR_StdSharedPtr_GetInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetInt.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetInt`. + * + * Calls `MR_StdSharedPtr_SetInt()`. + */ + public static void SetInt(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetInt.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDef`. + * + * Calls `MR_StdSharedPtr_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueRef()`. + */ + public static void SetIntRvalueRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueConstRef()`. + */ + public static void SetIntRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr`. + * + * Calls `MR_StdSharedPtr_GetIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr`. + * + * Calls `MR_StdSharedPtr_SetIntArr()`. + */ + public static void SetIntArr(mrbind_test.mr.cs.std_shared_ptr_int32_t_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArrDefTrivial()`. + */ + public static void SetIntArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_t_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDef`. + * + * Calls `MR_StdSharedPtr_SetIntArrDef()`. + */ + public static void SetIntArrDef(mrbind_test.mr.cs.std_shared_ptr_int32_t_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr42`. + * + * Calls `MR_StdSharedPtr_GetIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 GetIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42`. + * + * Calls `MR_StdSharedPtr_SetIntArr42()`. + */ + public static void SetIntArr42(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArr42DefTrivial()`. + */ + public static void SetIntArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42Def`. + * + * Calls `MR_StdSharedPtr_SetIntArr42Def()`. + */ + public static void SetIntArr42Def(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClass`. + * + * Calls `MR_StdSharedPtr_GetClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClass.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClass`. + * + * Calls `MR_StdSharedPtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClass.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDef`. + * + * Calls `MR_StdSharedPtr_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr`. + * + * Calls `MR_StdSharedPtr_GetClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr`. + * + * Calls `MR_StdSharedPtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDef`. + * + * Calls `MR_StdSharedPtr_SetClassArrDef()`. + */ + public static void SetClassArrDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr42`. + * + * Calls `MR_StdSharedPtr_GetClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 GetClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42`. + * + * Calls `MR_StdSharedPtr_SetClassArr42()`. + */ + public static void SetClassArr42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArr42DefTrivial()`. + */ + public static void SetClassArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42Def`. + * + * Calls `MR_StdSharedPtr_SetClassArr42Def()`. + */ + public static void SetClassArr42Def(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * With constness: + * Try const element types: + * Generated from function `MR::StdSharedPtr::GetConstInt`. + * + * Calls `MR_StdSharedPtr_GetConstInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstInt.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr42`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42 GetConstIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClass`. + * + * Calls `MR_StdSharedPtr_GetConstClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClass.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr42`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 GetConstClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java new file mode 100644 index 00000000..d0049795 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java @@ -0,0 +1,158 @@ +package mrbind_test.mr.stdstring; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdString::Set`. + * + * Calls `MR_StdString_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::SetWithDefault`. + * + * Calls `MR_StdString_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::Get`. + * + * Calls `MR_StdString_Get()`. + */ + public static mrbind_test.mr.cs.std_string Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Get.invokeExact(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::WriteToRef`. + * + * Calls `MR_StdString_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string ref) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdString::WriteToPtr`. + * + * Calls `MR_StdString_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdString::ConstRef`. + * + * Calls `MR_StdString_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::RvalueRef`. + * + * Calls `MR_StdString_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::ConstRvalueRef`. + * + * Calls `MR_StdString_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java new file mode 100644 index 00000000..5a809a36 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java @@ -0,0 +1,158 @@ +package mrbind_test.mr.stdstringview; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdStringView::Set`. + * + * Calls `MR_StdStringView_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::SetWithDefault`. + * + * Calls `MR_StdStringView_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::Get`. + * + * Calls `MR_StdStringView_Get()`. + */ + public static mrbind_test.mr.cs.std_string_view Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Get.invokeExact(); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToRef`. + * + * Calls `MR_StdStringView_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string_view ref) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToPtr`. + * + * Calls `MR_StdStringView_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string_view ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRef`. + * + * Calls `MR_StdStringView_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::RvalueRef`. + * + * Calls `MR_StdStringView_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRvalueRef`. + * + * Calls `MR_StdStringView_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java new file mode 100644 index 00000000..5e9e9ad0 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -0,0 +1,231 @@ +package mrbind_test.mr.stdtuplelike; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdTupleLike::SetPair`. + * + * Calls `MR_StdTupleLike_SetPair()`. + */ + public static void SetPair(mrbind_test.mr.cs.std_pair_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetPair.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair`. + * + * Calls `MR_StdTupleLike_GetPair()`. + */ + public static mrbind_test.mr.cs.std_pair_int32_t_float GetPair() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair2`. + * + * Calls `MR_StdTupleLike_GetPair2()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int32_t_float GetPair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair2.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair3`. + * + * Calls `MR_StdTupleLike_GetPair3()`. + */ + public static mrbind_test.mr.cs.std_pair_int32_t_ref_float_ref GetPair3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair3.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int32_t_ref_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair4`. + * + * Calls `MR_StdTupleLike_GetPair4()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref GetPair4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair4.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair5`. + * + * Calls `MR_StdTupleLike_GetPair5()`. + */ + public static mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref GetPair5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair5.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair6`. + * + * Calls `MR_StdTupleLike_GetPair6()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref GetPair6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair6.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::SetTuple`. + * + * Calls `MR_StdTupleLike_SetTuple()`. + */ + public static void SetTuple(mrbind_test.mr.cs.std_tuple_int32_t_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetTuple.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple`. + * + * Calls `MR_StdTupleLike_GetTuple()`. + */ + public static mrbind_test.mr.cs.std_tuple_int32_t_float GetTuple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Three separate tuples to avoid generating file paths that are too long, as those cause issues on some filesystems apparently. + * Generated from function `MR::StdTupleLike::GetTuple2`. + * + * Calls `MR_StdTupleLike_GetTuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102 GetTuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple2.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple7`. + * + * Calls `MR_StdTupleLike_GetTuple7()`. + */ + public static mrbind_test.mr.cs.std_tuple GetTuple7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple7.invokeExact(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple8`. + * + * Calls `MR_StdTupleLike_GetTuple8()`. + */ + public static mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t GetTuple8() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple8.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java new file mode 100644 index 00000000..fa476c36 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stduniqueptr; + +/** + * Now with a class: + * Generated from class `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdUniquePtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stduniqueptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdUniquePtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stduniqueptr.A assignFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java new file mode 100644 index 00000000..df9d2c5b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -0,0 +1,596 @@ +package mrbind_test.mr.stduniqueptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdUniquePtr::GetInt`. + * + * Calls `MR_StdUniquePtr_GetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetInt.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetInt`. + * + * Calls `MR_StdUniquePtr_SetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetInt(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetInt.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_unique_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDef`. + * + * Calls `MR_StdUniquePtr_SetIntDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_unique_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_int32_t _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueConstRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueConstRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueConstRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetIntArr`. + * + * Calls `MR_StdUniquePtr_GetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetIntArr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArr`. + * + * Calls `MR_StdUniquePtr_SetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntArrDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDef`. + * + * Calls `MR_StdUniquePtr_SetIntArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClass`. + * + * Calls `MR_StdUniquePtr_GetClass()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClass.invokeExact(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClass`. + * + * Calls `MR_StdUniquePtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClass.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDef`. + * + * Calls `MR_StdUniquePtr_SetClassDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueConstRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClassArr`. + * + * Calls `MR_StdUniquePtr_GetClassArr()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClassArr.invokeExact(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArr`. + * + * Calls `MR_StdUniquePtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArr.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDef`. + * + * Calls `MR_StdUniquePtr_SetClassArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try const element types: + * Generated from function `MR::StdUniquePtr::GetConstInt`. + * + * Calls `MR_StdUniquePtr_GetConstInt()`. + */ + public static int GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstInt.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstIntArr`. + * + * Calls `MR_StdUniquePtr_GetConstIntArr()`. + */ + public static int GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstIntArr.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClass`. + * + * Calls `MR_StdUniquePtr_GetConstClass()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClass.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClassArr`. + * + * Calls `MR_StdUniquePtr_GetConstClassArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClassArr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Here `std::unique_ptr` never gets emitted as an actual type (since we don't have non-null default arguments), so its header should not be emitted. + * Generated from function `MR::StdUniquePtr::GetFloat`. + * + * Calls `MR_StdUniquePtr_GetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetFloat() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetFloat.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloat`. + * + * Calls `MR_StdUniquePtr_SetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloat(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloat.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloatDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetFloatDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloatDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloatDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java new file mode 100644 index 00000000..b9dca994 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java @@ -0,0 +1,86 @@ +package mrbind_test.mr.stdvariant; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdVariant::foo`. + * + * Calls `MR_StdVariant_foo()`. + */ + public static mrbind_test.mr.cs.std_variant_int32_t_float foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_foo.invokeExact(); + return new mrbind_test.mr.cs.std_variant_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdVariant::bar`. + * + * Calls `MR_StdVariant_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_variant_int32_t_float_float _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::baz`. + * + * Calls `MR_StdVariant_baz()`. + */ + public static void baz(mrbind_test.mr.cs.std_variant_int32_t_float_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_baz.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::blah`. + * + * Calls `MR_StdVariant_blah()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_blah.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java new file mode 100644 index 00000000..f648b7af --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java @@ -0,0 +1,93 @@ +package mrbind_test.mr.tags; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_int32_t()`. + */ + public static void foo_1_std_less_int32_t() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_int32_t.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_void()`. + */ + public static void foo_1_std_less_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_void.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_int32_t()`. + */ + public static void foo_1_std_greater_int32_t() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_int32_t.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_void()`. + */ + public static void foo_1_std_greater_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_void.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_0()`. + */ + public static void foo_0() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_0.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java new file mode 100644 index 00000000..cc4b6ff6 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -0,0 +1,207 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Class templates. + * Generated from class `MR::TestSimpleTypes::ClassTemplate`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassTemplate_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassTemplate_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassTemplate_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother()`. + */ + public ClassTemplate_uint64_t(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t()`. + */ + public ClassTemplate_uint64_t(long _1) + { + this(__ctor_construct_uint64_t(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_uint64_t(long _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int32_t()`. + */ + public ClassTemplate_uint64_t(int _1) + { + this(__ctor_construct_int32_t(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_int32_t(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int32_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::TestSimpleTypes::ClassTemplate::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother()`. + */ + public mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t assignFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t()`. + */ + public void foo_uint64_t() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int32_t()`. + */ + public void foo_int32_t() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int32_t.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t.invokeExact(); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java new file mode 100644 index 00000000..62753798 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Enums. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class ClassTemplate_uint64_t_Enum +{ + public final int value; + + public ClassTemplate_uint64_t_Enum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static ClassTemplate_uint64_t_Enum of(int value) + { + return new ClassTemplate_uint64_t_Enum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof ClassTemplate_uint64_t_Enum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "ClassTemplate_uint64_t_Enum(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E.java new file mode 100644 index 00000000..7029ea94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E2.java new file mode 100644 index 00000000..9069a41b --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E2.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has a custom underlying type. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final short value; + + public E2(short value) {this.value = value;} + + public static final E2 e1 = new E2((short)0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(short value) + { + if (value == e1.value) return e1; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return (int)value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E3.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E3.java new file mode 100644 index 00000000..f3991b6c --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E3.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has no constants. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E3 +{ + public final int value; + + public E3(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E3 of(int value) + { + return new E3(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E3 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E3(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E4.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E4.java new file mode 100644 index 00000000..2a2f676e --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E4.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This has multiple words in the underlying type. This has caused a bug at one point... + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E4 +{ + public final int value; + + public E4(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E4 of(int value) + { + return new E4(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E4 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E4(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E5.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E5.java new file mode 100644 index 00000000..4525186f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/E5.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This will use a custom typedef for the underlying type, if that's enabled! + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E5 +{ + public final long value; + + public E5(long value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E5 of(long value) + { + return new E5(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E5 o && o.value == value;} + @java.lang.Override public int hashCode() {return java.lang.Long.hashCode(value);} + @java.lang.Override public java.lang.String toString() + { + return "E5(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java new file mode 100644 index 00000000..99c1a171 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -0,0 +1,860 @@ +package mrbind_test.mr.testsimpletypes; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSimpleTypes::GetInt`. + * + * Calls `MR_TestSimpleTypes_GetInt()`. + */ + public static int GetInt() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetInt.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetInt`. + * + * Calls `MR_TestSimpleTypes_SetInt()`. + */ + public static void SetInt(int _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetInt.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntDef`. + * + * Calls `MR_TestSimpleTypes_SetIntDef()`. + */ + public static void SetIntDef(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntPtr`. + * + * Calls `MR_TestSimpleTypes_GetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtr`. + * + * Calls `MR_TestSimpleTypes_SetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntRef`. + * + * Calls `MR_TestSimpleTypes_GetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntRef.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRef`. + * + * Calls `MR_TestSimpleTypes_SetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRefDef`. + * + * Calls `MR_TestSimpleTypes_SetIntRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetConstVoidPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtrPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtrPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum`. + * + * Calls `MR_TestSimpleTypes_GetEnum()`. + */ + public static int GetEnum() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum`. + * + * Calls `MR_TestSimpleTypes_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.testsimpletypes.E _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.testsimpletypes.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1.value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_GetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumRef`. + * + * Calls `MR_TestSimpleTypes_GetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumRef.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2`. + * + * Calls `MR_TestSimpleTypes_GetEnum2()`. + */ + public static int GetEnum2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2`. + * + * Calls `MR_TestSimpleTypes_SetEnum2()`. + */ + public static void SetEnum2(mrbind_test.mr.testsimpletypes.E2 _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Def`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Def()`. + */ + public static void SetEnum2Def(mrbind_test.mr.testsimpletypes.E2 _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Def.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, _1.value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ref(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ref.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2RefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2RefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2RefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2RefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test all kinds of `char`. + * Generated from function `MR::TestSimpleTypes::CheckCharMaybeUnsigned`. + * + * Calls `MR_TestSimpleTypes_CheckCharMaybeUnsigned()`. Some types are raw C types, see the C bindings for the details. + */ + public static void CheckCharMaybeUnsigned(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckCharMaybeUnsigned.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_uint8_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_uint8_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_uint8_t_ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_int8_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_int8_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_int8_t_ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_uint64_t()`. + */ + public static long blah_uint64_t(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_uint64_t.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_int64_t()`. + */ + public static long blah_int64_t(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_int64_t.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_uint64_t()`. + */ + public static long FuncTemplate(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_int32_t()`. + */ + public static int FuncTemplate(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_int32_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java new file mode 100644 index 00000000..fb8a1130 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.testsizet; + +/** + * Generated from class `MR::TestSizeT::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TestSizeT_A_uint64_t_DefaultConstruct()`. + */ + public A_uint64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TestSizeT::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSizeT_A_uint64_t_ConstructFromAnother()`. + */ + public A_uint64_t(mrbind_test.mr.testsizet.A_uint64_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsizet.A_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSizeT_A_uint64_t_AssignFromAnother()`. + */ + public mrbind_test.mr.testsizet.A_uint64_t assignFromAnother(mrbind_test.mr.testsizet.A_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsizet.A_uint64_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::foo`. + * + * Calls `MR_TestSizeT_A_uint64_t_foo()`. + */ + public long foo() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java new file mode 100644 index 00000000..68382cc2 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.testsizet; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_uint64_t()`. + */ + public static long foo_uint64_t(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_uint64_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_uint64_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t_ptr.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_uint64_t()`. + */ + public static mrbind_test.mr.cs.std_vector_uint64_t foo(mrbind_test.mr.cs.std_vector_uint64_t _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_uint64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.cs.std_vector_uint64_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_int64_t()`. + */ + public static long foo_int64_t(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_int64_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_int64_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t_ptr.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_int64_t()`. + */ + public static mrbind_test.mr.cs.std_vector_int64_t foo(mrbind_test.mr.cs.std_vector_int64_t _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_int64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.cs.std_vector_int64_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java new file mode 100644 index 00000000..2cf34315 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * This tests a specific Clang bug/quirk. + * Certain typedefs in templates get their names printed without the template arguments of the enclosing class template, breaking our code generation. + * Generated from class `MR::TypedefsInTemplates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_A_int32_t_DefaultConstruct()`. + */ + public A_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_A_int32_t_ConstructFromAnother()`. + */ + public A_int32_t(mrbind_test.mr.typedefsintemplates.A_int32_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_A_int32_t_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.A_int32_t assignFromAnother(mrbind_test.mr.typedefsintemplates.A_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.A_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::foo`. + * + * Calls `MR_TypedefsInTemplates_A_int32_t_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java new file mode 100644 index 00000000..fb53e9ad --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_DefaultConstruct()`. + */ + public B_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_ConstructFromAnother()`. + */ + public B_int32_t(mrbind_test.mr.typedefsintemplates.B_int32_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int32_t assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int32_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int32_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java new file mode 100644 index 00000000..4640c150 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java @@ -0,0 +1,145 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B::BB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int32_t_BB_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int32_t_BB_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int32_t_BB_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_BB_float_DefaultConstruct()`. + */ + public B_int32_t_BB_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::BB::BB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_BB_float_ConstructFromAnother()`. + */ + public B_int32_t_BB_float(mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_BB_float_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo`. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_BB_float_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo2`. + * + * Calls `MR_TypedefsInTemplates_B_int32_t_BB_float_foo2()`. + */ + public int foo2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_foo2.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java new file mode 100644 index 00000000..fb77bd94 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.typedefsintemplates; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TypedefsInTemplates::bar`. + * + * Calls `MR_TypedefsInTemplates_bar()`. + */ + public static void bar(int _1) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_bar.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java new file mode 100644 index 00000000..4c27b6fc --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,267 @@ +package mrbind_test.mr.usingdecls; + +/** + * Test how `using` declarations import things. + * Generated from class `MR::UsingDecls::A`. + * Derived classes: + * Direct: (non-virtual) + * `MR::UsingDecls::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.usingdecls.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * + * Calls `MR_UsingDecls_A_Construct()`. + */ + public A(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from conversion operator `MR::UsingDecls::A::operator int32_t`. + * + * Calls `MR_UsingDecls_A_ConvertTo_int32_t()`. + */ + public int convertTo_int32_t() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConvertTo_int32_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_A_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.A assignFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * + * Calls `MR_UsingDecls_A_assign()`. + */ + public void assign(int _1) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_assign.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::Method`. + * + * Calls `MR_UsingDecls_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::StaticFunc`. + * + * Calls `MR_UsingDecls_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * + * Calls `MR_UsingDecls_A_Get_StaticVar()`. + */ + public static int StaticVar() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * The reference to the parameter `value` might be preserved in this object in element `StaticVar`. + * + * Calls `MR_UsingDecls_A_Set_StaticVar()`. + */ + public static void setStaticVar(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_UsingDecls_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `Field`. + * The reference to the parameter `value` might be preserved in this object in element `Field`. + * + * Calls `MR_UsingDecls_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A_E.java new file mode 100644 index 00000000..73683b21 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.usingdecls; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java new file mode 100644 index 00000000..20f03260 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,81 @@ +package mrbind_test.mr.usingdecls; + +/** + * Generated from class `MR::UsingDecls::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::UsingDecls::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.usingdecls.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_B_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java new file mode 100644 index 00000000..3ad9b6b3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_DefaultConstruct()`. + */ + public phmap_btree_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_ConstructFromAnother()`. + */ + public phmap_btree_map_int32_t_float(mrbind_test.phmap.phmap_btree_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..c1b09a45 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_btree_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java new file mode 100644 index 00000000..7d71685d --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int32_t_float_iterator(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int32_t_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java new file mode 100644 index 00000000..33e74795 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java @@ -0,0 +1,416 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_DefaultConstruct()`. + */ + public phmap_btree_multimap_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int32_t_float(mrbind_test.phmap.phmap_btree_multimap_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java new file mode 100644 index 00000000..71dbe706 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int32_t_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_btree_multimap_int32_t_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java new file mode 100644 index 00000000..fb5f28a9 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_multimap_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int32_t_float_iterator(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int32_t_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java new file mode 100644 index 00000000..fe2d051f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_DefaultConstruct()`. + */ + public phmap_btree_multiset_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int32_t(mrbind_test.phmap.phmap_btree_multiset_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_ConstructFromRange()`. + */ + public phmap_btree_multiset_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java new file mode 100644 index 00000000..22da6bf8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multiset_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multiset_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int32_t_const_iterator(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java new file mode 100644 index 00000000..244ea122 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int32_t_DefaultConstruct()`. + */ + public phmap_btree_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int32_t_ConstructFromAnother()`. + */ + public phmap_btree_set_int32_t(mrbind_test.phmap.phmap_btree_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_set_int32_t_ConstructFromRange()`. + */ + public phmap_btree_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java new file mode 100644 index 00000000..f7837b40 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_set_int32_t_const_iterator(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_set_int32_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java new file mode 100644 index 00000000..b7b526b3 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int32_t_float(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..e3e8b7a5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_flat_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java new file mode 100644 index 00000000..17645640 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_flat_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int32_t_float_iterator(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java new file mode 100644 index 00000000..3db432d8 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int32_t(mrbind_test.phmap.phmap_flat_hash_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_ConstructFromRange()`. + */ + public phmap_flat_hash_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java new file mode 100644 index 00000000..17a4f232 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int32_t_const_iterator(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java new file mode 100644 index 00000000..3da4bd0f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_DefaultConstruct()`. + */ + public phmap_node_hash_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int32_t_float(mrbind_test.phmap.phmap_node_hash_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..600daa51 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_node_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java new file mode 100644 index 00000000..a8246b24 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_node_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int32_t_float_iterator(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_node_hash_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java new file mode 100644 index 00000000..30a78205 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_DefaultConstruct()`. + */ + public phmap_node_hash_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int32_t(mrbind_test.phmap.phmap_node_hash_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_ConstructFromRange()`. + */ + public phmap_node_hash_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java new file mode 100644 index 00000000..42cb5923 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int32_t_const_iterator(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java new file mode 100644 index 00000000..ae6d1465 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..8fee9883 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java new file mode 100644 index 00000000..571ce3df --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_flat_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int32_t_float_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java new file mode 100644 index 00000000..469d3c26 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int32_t(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromRange()`. + */ + public phmap_parallel_flat_hash_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java new file mode 100644 index 00000000..f6f7765f --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int32_t_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java new file mode 100644 index 00000000..16690f92 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int32_t_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int32_t_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int32_t_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int32_t_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int32_t_float(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java new file mode 100644 index 00000000..eae8afb7 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int32_t_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int32_t_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int32_t_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int32_t_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_node_hash_map_int32_t_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java new file mode 100644 index 00000000..546a98ad --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_node_hash_map_int32_t_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int32_t_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int32_t_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int32_t_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int32_t_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int32_t_float_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java new file mode 100644 index 00000000..fc2aad65 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java @@ -0,0 +1,367 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int32_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int32_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int32_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int32_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int32_t(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromRange()`. + */ + public phmap_parallel_node_hash_set_int32_t(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java new file mode 100644 index 00000000..9d561bb5 --- /dev/null +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_set_int32_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int32_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int32_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int32_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int32_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int32_t_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java new file mode 100644 index 00000000..5969c872 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java @@ -0,0 +1,9 @@ +package mrbind_test; + +/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +public class CppException extends RuntimeException +{ + private static final long serialVersionUID = 1; + + public CppException(String message) {super(message);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java new file mode 100644 index 00000000..2909e68e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java @@ -0,0 +1,90 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * + * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), + * or is a reference to an object owned by something else. References returned by methods keep their owner alive. + */ +public abstract class CppObject implements Native, AutoCloseable +{ + // Runs the destructor from the cleaner. Must not reference the wrapper, or it would never be collected. + private static final class State implements Runnable + { + final java.lang.foreign.MemorySegment ptr; + final java.util.function.Consumer destroy; + volatile boolean owned = true; + + State(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy) + { + this.ptr = ptr; + this.destroy = destroy; + } + + @Override public void run() + { + if (owned) + { + owned = false; + destroy.accept(ptr); + } + } + } + + private final java.lang.foreign.MemorySegment ptr; + private final State state; // Null if not owned. + private final java.lang.ref.Cleaner.Cleanable cleanable; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + private boolean closed; + + /** + * Wraps a pointer from the C bindings. If `destroy` is not null, the object is owned and `destroy` is called on it when the wrapper dies. + * `owner` is kept alive as long as this wrapper is. + */ + @SuppressWarnings("this-escape") + protected CppObject(java.lang.foreign.MemorySegment ptr, java.util.function.Consumer destroy, Object owner) + { + if (ptr.address() == 0) + throw new NullPointerException("The C bindings returned a null pointer."); + this.ptr = ptr; + this.owner = owner; + if (destroy != null) + { + state = new State(ptr, destroy); + cleanable = Ffi.CLEANER.register(this, state); + } + else + { + state = null; + cleanable = null; + } + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() + { + if (closed) + throw new IllegalStateException("This object was closed or moved from."); + return ptr; + } + + /** Does this wrapper own its C++ object? */ + public final boolean isOwned() {return state != null && state.owned;} + + /** Destroys the C++ object now, if owned. The wrapper can't be used after this. Calling it again does nothing. */ + @Override public final void close() + { + closed = true; + if (cleanable != null) + cleanable.clean(); + } + + /** Gives up the ownership of the C++ object and returns its pointer. The caller is responsible for destroying it. The wrapper can't be used after this. */ + public final java.lang.foreign.MemorySegment release() + { + if (!isOwned()) + throw new IllegalStateException("This object is not owned by the wrapper, it can't be moved from."); + state.owned = false; + closed = true; + return ptr; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java new file mode 100644 index 00000000..16a3e7c1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java @@ -0,0 +1,22 @@ +package mrbind_test; + +/** + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * + * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), + * those returned by reference from the bindings point into memory owned by something else, which they keep alive. + */ +public abstract class CppStruct implements Native +{ + protected final java.lang.foreign.MemorySegment segment; + @SuppressWarnings("unused") private final Object owner; // Only here to keep the owner of a reference alive. + + /** Wraps a segment of the exact struct size. `owner` is kept alive as long as this wrapper is. */ + protected CppStruct(java.lang.foreign.MemorySegment segment, Object owner) + { + this.segment = segment; + this.owner = owner; + } + + @Override public final java.lang.foreign.MemorySegment rawPointer() {return segment;} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java new file mode 100644 index 00000000..546a4580 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java @@ -0,0 +1,214 @@ +package mrbind_test; + +/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +@SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. +public final class Ffi +{ + private Ffi() {} + + public static final java.lang.foreign.Linker LINKER = java.lang.foreign.Linker.nativeLinker(); + public static final java.lang.ref.Cleaner CLEANER = java.lang.ref.Cleaner.create(); + public static final boolean IS_WINDOWS = System.getProperty("os.name", "").toLowerCase(java.util.Locale.ROOT).startsWith("windows"); + + /** The layout of C `long`: 4 bytes on Windows, 8 bytes elsewhere. The name lets `downcall()` widen it to a Java `long`. */ + public static final java.lang.foreign.ValueLayout C_LONG = (IS_WINDOWS ? java.lang.foreign.ValueLayout.JAVA_INT : java.lang.foreign.ValueLayout.JAVA_LONG).withName("mrbind_c_long"); + + /** How an object is passed to a C function. Matches the C enum `MR_C_PassBy`. */ + public static final int PASS_BY_DEFAULT_CONSTRUCT = 0; + public static final int PASS_BY_COPY = 1; + public static final int PASS_BY_MOVE = 2; + public static final int PASS_BY_MOVE_AND_DESTROY = 3; + public static final int PASS_BY_DEFAULT_ARGUMENT = 4; + public static final int PASS_BY_NO_OBJECT = 5; + + // The library of each file group of the C bindings, see `--split-library` in the C generator. + private static final java.util.Map LIB_NAMES = java.util.Map.of("", "bleh", "MR_AB_", "bleh_AB"); + private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); + + /** + * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, + * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + */ + public static synchronized java.lang.foreign.SymbolLookup lookup(String group) + { + java.lang.foreign.SymbolLookup ret = LOOKUPS.get(group); + if (ret == null) + { + String lib = LIB_NAMES.get(group); + if (lib == null) + throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + try + { + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); + } + catch (UnsatisfiedLinkError e) + { + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } + } + LOOKUPS.put(group, ret); + } + return ret; + } + + /** + * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. + * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. + */ + public static java.lang.invoke.MethodHandle downcall(String group, String name, java.lang.foreign.FunctionDescriptor desc) + { + java.util.Optional symbol = lookup(group).find(name); + java.lang.invoke.MethodHandle handle; + if (symbol.isPresent()) + { + handle = LINKER.downcallHandle(symbol.get(), desc); + } + else + { + java.lang.invoke.MethodType type = desc.toMethodType(); + if (desc.returnLayout().isPresent() && desc.returnLayout().get() instanceof java.lang.foreign.GroupLayout) + type = type.insertParameterTypes(0, java.lang.foreign.SegmentAllocator.class); // Struct returns take an allocator first. + UnsatisfiedLinkError error = new UnsatisfiedLinkError("The function `" + name + "` is missing from the library `" + LIB_NAMES.get(group) + "`."); + handle = java.lang.invoke.MethodHandles.throwException(type.returnType(), UnsatisfiedLinkError.class).bindTo(error); + handle = java.lang.invoke.MethodHandles.dropArguments(handle, 0, type.parameterList()); + } + java.lang.invoke.MethodType type = handle.type(); + boolean changed = false; + if (desc.returnLayout().isPresent() && isCLong(desc.returnLayout().get()) && type.returnType() == int.class) + { + type = type.changeReturnType(long.class); + changed = true; + } + java.util.List args = desc.argumentLayouts(); + int offset = type.parameterCount() - args.size(); // 1 if a `SegmentAllocator` was prepended for a struct return. + for (int i = 0; i < args.size(); i++) + { + if (isCLong(args.get(i)) && type.parameterType(i + offset) == int.class) + { + type = type.changeParameterType(i + offset, long.class); + changed = true; + } + } + if (changed) + handle = java.lang.invoke.MethodHandles.explicitCastArguments(handle, type); + return handle; + } + + private static boolean isCLong(java.lang.foreign.MemoryLayout layout) + { + return layout.name().isPresent() && layout.name().get().equals("mrbind_c_long"); + } + + public static long getCLong(java.lang.foreign.MemorySegment segment, long offset) + { + return IS_WINDOWS ? segment.get(java.lang.foreign.ValueLayout.JAVA_INT, offset) : segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, offset); + } + + public static void setCLong(java.lang.foreign.MemorySegment segment, long offset, long value) + { + if (IS_WINDOWS) + segment.set(java.lang.foreign.ValueLayout.JAVA_INT, offset, (int)value); + else + segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, offset, value); + } + + /** The pointer of a wrapper, or `NULL` for a null wrapper. */ + public static java.lang.foreign.MemorySegment ptr(Native object) + { + return object == null ? java.lang.foreign.MemorySegment.NULL : object.rawPointer(); + } + + /** The pointer of a wrapper. Throws if the wrapper is null. */ + public static java.lang.foreign.MemorySegment ptrNonNull(Native object, String name) + { + if (object == null) + throw new NullPointerException("The parameter `" + name + "` must not be null."); + return object.rawPointer(); + } + + // Allocates a single value, for the parameters passed by pointer. + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfBoolean layout, boolean value) {return allocator.allocate(layout).fill((byte)(value ? 1 : 0));} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfByte layout, byte value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfShort layout, short value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfInt layout, int value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfLong layout, long value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfFloat layout, float value) {return allocator.allocateFrom(layout, value);} + public static java.lang.foreign.MemorySegment alloc(java.lang.foreign.SegmentAllocator allocator, java.lang.foreign.ValueLayout.OfDouble layout, double value) {return allocator.allocateFrom(layout, value);} + + /** Allocates the UTF-8 bytes of a string, without a null terminator. Returns `NULL` for null. */ + public static java.lang.foreign.MemorySegment utf8(java.lang.foreign.SegmentAllocator allocator, String str) + { + if (str == null) + return java.lang.foreign.MemorySegment.NULL; + byte[] bytes = str.getBytes(java.nio.charset.StandardCharsets.UTF_8); + return allocator.allocateFrom(java.lang.foreign.ValueLayout.JAVA_BYTE, bytes); + } + + /** The end pointer of a segment allocated by `utf8()`. `NULL` for `NULL`. */ + public static java.lang.foreign.MemorySegment end(java.lang.foreign.MemorySegment segment) + { + return segment.address() == 0 ? java.lang.foreign.MemorySegment.NULL : segment.asSlice(segment.byteSize()); + } + + /** Decodes a UTF-8 string from `size` bytes at `data`. */ + public static String string(java.lang.foreign.MemorySegment data, long size) + { + if (size == 0) + return ""; + return new String(data.reinterpret(size).toArray(java.lang.foreign.ValueLayout.JAVA_BYTE), java.nio.charset.StandardCharsets.UTF_8); + } + + /** Builds a struct layout with the C alignment rules: each field is aligned naturally, and the struct is padded to its alignment. */ + public static java.lang.foreign.StructLayout structLayout(String[] names, java.lang.foreign.MemoryLayout[] fields) + { + java.util.List elems = new java.util.ArrayList<>(); + long offset = 0, align = 1; + for (int i = 0; i < fields.length; i++) + { + long a = fields[i].byteAlignment(); + long pad = (a - offset % a) % a; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + elems.add(fields[i].withName(names[i])); + offset += pad + fields[i].byteSize(); + align = Math.max(align, a); + } + long pad = (align - offset % align) % align; + if (pad > 0) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(pad)); + if (elems.isEmpty()) + elems.add(java.lang.foreign.MemoryLayout.paddingLayout(1)); // Empty C++ structs have the size 1. + return java.lang.foreign.MemoryLayout.structLayout(elems.toArray(new java.lang.foreign.MemoryLayout[0])); + } + + /** Checks a struct layout against the size and alignment the C bindings were generated with. */ + public static void checkLayout(java.lang.foreign.StructLayout layout, long size, long alignment, String name) + { + if (layout.byteSize() != size || layout.byteAlignment() != alignment) + throw new IllegalStateException("The Java layout of `" + name + "` (" + layout.byteSize() + " bytes, aligned to " + layout.byteAlignment() + ") doesn't match C++ (" + size + " bytes, aligned to " + alignment + ")."); + } + + /** Allocates zeroed memory for a struct. It's freed when the segment becomes unreachable. */ + public static java.lang.foreign.MemorySegment allocStruct(java.lang.foreign.MemoryLayout layout) + { + return java.lang.foreign.Arena.ofAuto().allocate(layout); + } + + /** Converts a `Throwable` from `invokeExact()` to something that can be thrown from a method without a `throws` clause. */ + public static RuntimeException rethrow(Throwable e) + { + if (e instanceof RuntimeException r) + return r; + if (e instanceof Error err) + throw err; + return new RuntimeException(e); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java new file mode 100644 index 00000000..f9d8474e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java @@ -0,0 +1,8 @@ +package mrbind_test; + +/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +public interface Native +{ + /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ + java.lang.foreign.MemorySegment rawPointer(); +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java new file mode 100644 index 00000000..397858a5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.A; + +/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +public final class a +{ + private a() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecA = mrbind_test.Ffi.downcall("MR_AB_", "MR_GetSeparateVecA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..fbbf3c7f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_pair_MR_SeparateA_MR_SeparateB +{ + private std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java new file mode 100644 index 00000000..02995036 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_SeparateA +{ + private std_shared_ptr_MR_SeparateA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_get = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_has_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_use_count = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_reset = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_ConstructFromValue = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_Construct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_Assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_ConstructNonOwning = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_AssignNonOwning = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_ConstructAliasing = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_AssignAliasing = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java new file mode 100644 index 00000000..2abc314d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_SeparateB +{ + private std_shared_ptr_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_get = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_has_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_use_count = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_reset = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_ConstructFromValue = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_Construct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_Assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_ConstructNonOwning = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_AssignNonOwning = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_ConstructAliasing = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_AssignAliasing = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_shared_ptr_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..18d4e57e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateA +{ + private std_vector_MR_SeparateA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_size = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_empty = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_resize_with_default_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_clear = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_capacity = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_reserve = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_shrink_to_fit = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_at_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_front_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_back_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_push_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_pop_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_insert_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_erase_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_is_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_to_index_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateA_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateA_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..9cd0521a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_SeparateB +{ + private std_vector_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_size = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_empty = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_clear = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..39e97748 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi.AB.common; + +/** The downcall handles of the C bindings file `AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB +{ + private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java new file mode 100644 index 00000000..053d5b1a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.AB_base; + +/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +public final class ab_base +{ + private ab_base() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_mark_shared_common_base_ab = mrbind_test.Ffi.downcall("", "MR_mark_shared_common_base_ab", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java new file mode 100644 index 00000000..c05e16c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.B; + +/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +public final class b +{ + private b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetSeparateVecB = mrbind_test.Ffi.downcall("MR_AB_", "MR_GetSeparateVecB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java new file mode 100644 index 00000000..0b883a82 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +public final class _1 +{ + private _1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_foo = mrbind_test.Ffi.downcall("", "MR_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_bar = mrbind_test.Ffi.downcall("", "MR_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Get_x = mrbind_test.Ffi.downcall("", "MR_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Set_x = mrbind_test.Ffi.downcall("", "MR_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java new file mode 100644 index 00000000..a9e022e4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +public final class test_abstract_classes +{ + private test_abstract_classes() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_A_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java new file mode 100644 index 00000000..ae649f6b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +public final class test_adjusting_names +{ + private test_adjusting_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_ConvertTo_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_ConvertTo_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_foo = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_bar = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Get_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Get_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_GetMutable_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_GetMutable_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Set_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Set_var_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_AdjustingNames_A_Destroy = mrbind_test.Ffi.downcall("", "MR_AdjustingNames_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java new file mode 100644 index 00000000..33cc0d87 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java @@ -0,0 +1,126 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +public final class test_aggregates +{ + private test_aggregates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_x = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Get_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_GetMutable_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_GetMutable_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Set_y = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Set_y", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_a = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_b = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_c = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_d = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_e = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_f", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_f = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_f", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_g", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_g = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_g", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_h", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_h = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_h", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_i = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Get_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Get_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_GetMutable_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_GetMutable_j", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Set_j = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Set_j", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Aggregates_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_Aggregates_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java new file mode 100644 index 00000000..e61dea09 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types +{ + private test_arrays_of_incomplete_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_foo = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java new file mode 100644 index 00000000..c992d055 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +public final class test_arrays_of_incomplete_types_2 +{ + private test_arrays_of_incomplete_types_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncompleteArrayElemType_bar = mrbind_test.Ffi.downcall("", "MR_IncompleteArrayElemType_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java new file mode 100644 index 00000000..6d464b87 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +public final class test_bases +{ + private test_bases() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Bases_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_A_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D3_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D3_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_D3_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_D3_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_E_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java new file mode 100644 index 00000000..9e52d501 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +public final class test_combined_a_b +{ + private test_combined_a_b() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_GetCombinedVecAB = mrbind_test.Ffi.downcall("", "MR_GetCombinedVecAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java new file mode 100644 index 00000000..ede36e45 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +public final class test_conv_ops +{ + private test_conv_ops() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_ConvertTo_bool = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_ConvertTo_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_ConvOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_ConvOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java new file mode 100644 index 00000000..f56a456d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -0,0 +1,165 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +public final class test_copy_inherited_members +{ + private test_copy_inherited_members() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_L_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_L_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Method = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_StaticFunc = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Get_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Get_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_StaticField", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_StaticField = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_StaticField", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Get_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java new file mode 100644 index 00000000..e8f62dd4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java @@ -0,0 +1,1346 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +public final class test_csharp +{ + private test_csharp() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_ref2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_ref2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_bool_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_print_bool_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_print_bool_ref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_bool_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_bool_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ushort_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ushort_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_constness_str = mrbind_test.Ffi.downcall("", "MR_CSharp_test_constness_str", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_keyword_in_param_name = mrbind_test.Ffi.downcall("", "MR_CSharp_test_keyword_in_param_name", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_rref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_rref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_crref_MR_CSharp_E2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_crref_MR_CSharp_E2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_trivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_trivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_nontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_nontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_se_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_se_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_shcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_shcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_mark_sg_as_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_mark_sg_as_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_string_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_string_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_stringview_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_stringview_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_fspath_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_fspath_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrI = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrI", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsA_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsB_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsB_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsC_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsC_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsD_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsD_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsE_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsE_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsF_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsF_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsG_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsG_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsLhsH_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsLhsH_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsA = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsB = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsB", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsC = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsD = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsE = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsF = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsG = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_StaticOpsRhsH = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_StaticOpsRhsH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsEnum_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsEnum_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_float = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_add_float_MR_CSharp_NonTrivialClassOps = mrbind_test.Ffi.downcall("", "MR_C_add_float_MR_CSharp_NonTrivialClassOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps = mrbind_test.Ffi.downcall("", "MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convtrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convtrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_class_convnontrivial_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_class_convnontrivial_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_sub_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_div_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_mod_int_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_vec = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_vec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_asave_ref_in_exposed_layout = mrbind_test.Ffi.downcall("", "MR_CSharp_asave_ref_in_exposed_layout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_sub_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_div_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_div_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_int_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_mod_int_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_make_exposed_sh = mrbind_test.Ffi.downcall("", "MR_CSharp_make_exposed_sh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optint_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optint_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optstr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optstr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_opttriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_opttriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optnontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optnontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshexp_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshexp_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_optshtriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_optshtriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cref", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_tag_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_tag_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_variant_with_repeated_types = mrbind_test.Ffi.downcall("", "MR_CSharp_test_variant_with_repeated_types", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_iostreams_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_iostreams_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_uniqueptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_uniqueptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H1 + { + private H1() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_rref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_rref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_crref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_crref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarr2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarr2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_plainarrenum2_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_plainarrenum2_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs1 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_ptrs2 = mrbind_test.Ffi.downcall("", "MR_CSharp_test_ptrs2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_intptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_intptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_voidptrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_voidptrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_arrcptr_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_arrcptr_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflicts", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_nameConflictsExposed = mrbind_test.Ffi.downcall("", "MR_CSharp_nameConflictsExposed", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_int = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_LifetimesC_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_LifetimesC_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableD_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableD_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableE_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableE_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_const_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_const_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_MR_CSharp_IterableF_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_end_MR_CSharp_IterableF_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_begin_int = mrbind_test.Ffi.downcall("", "MR_CSharp_begin_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_end_int = mrbind_test.Ffi.downcall("", "MR_CSharp_end_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_mut_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_mut_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_vec_of_const_ptr_to_class = mrbind_test.Ffi.downcall("", "MR_CSharp_test_vec_of_const_ptr_to_class", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple0 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple1 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_pair2 = mrbind_test.Ffi.downcall("", "MR_CSharp_get_pair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_const = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_const", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_crefs = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_crefs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_value = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_lvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_lvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_get_tuple_exposed_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_get_tuple_exposed_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_int_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_int_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_void_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_void_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_enum_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_enum_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_triv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_triv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_nontriv_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_nontriv_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cref = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_test_expected_exposed_shared_cptr = mrbind_test.Ffi.downcall("", "MR_CSharp_test_expected_exposed_shared_cptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_A_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_A_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_a_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_a_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_b_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_b_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_int = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_template_c_float = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_template_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_instantiate = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_instantiate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_AmbiguousTemplates_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_AmbiguousTemplates_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_iaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_iaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ci = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ci", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_cia = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_cia", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_ciaa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_ciaa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_cs = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_cs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Get_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Get_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_GetSize_csa = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_GetSize_csa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ArrayMembers_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ArrayMembers_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_B_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + } + + public static final class H2 + { + private H2() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_C_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_0", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_3 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersClass_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersClass_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersExposed_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersExposed_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_sb", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sc = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sc", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_sd = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_sd", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Set_b = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_c = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_c", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Get_d = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Get_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersUshort_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersUshort_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_mut_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_mut_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConstNonconstConflicts_foo_char = mrbind_test.Ffi.downcall("", "MR_CSharp_ConstNonconstConflicts_foo_char", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref = mrbind_test.Ffi.downcall("", "MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int = mrbind_test.Ffi.downcall("", "MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_short = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_short", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_1_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_1_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Construct_2_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Construct_2_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtor_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtor_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorCopyButNoMove_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorCopyButNoMove_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorExposed_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorExposed_Construct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ConvCtorExposed.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorNonTrivialRestricted_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorNonTrivialRestricted_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvCtorWithDefArg_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvCtorWithDefArg_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_ConvertTo_float = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_ConvertTo_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_float_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ConvOpToRef_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_ConvOpToRef_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_D_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_E_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityA_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityA_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityA = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityB_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityB_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityB = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC_int = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_CSharp_EqualityC_int = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_CSharp_EqualityC_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityC = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityD_const_int_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityD_const_int_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_EqualityE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_EqualityE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayout_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayout_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayout_ref_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayout_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayout_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayout_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_add_const_MR_CSharp_ExposedLayout_ref_int = mrbind_test.Ffi.downcall("", "MR_C_add_const_MR_CSharp_ExposedLayout_ref_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayout_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayout_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_2", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H3 + { + private H3() {} + + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_F_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_F_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_F_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_G_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_G_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_G_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_d1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_d1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_d2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_d2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrA = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrB = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrC = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrD = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrE = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrF = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrF", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrG = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrG", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_CSharp_IncrDecrH = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_CSharp_IncrDecrH", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_index_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_index_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IndexerC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IndexerC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableJ_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableJ_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_IterableK_Iter = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_IterableK_Iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Iter_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Iter_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Set_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Set_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableL_int_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableL_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Get_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Set_x = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_end = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_LifetimesB_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_LifetimesB_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_return_ref_static = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_return_ref_static", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_ref_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_ref_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_store_this_in_param = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_store_this_in_param", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_get = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_return_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_return_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_store_ref_in_this = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_store_ref_in_this", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_LifetimesE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_LifetimesE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_name_Conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_name_Conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_name_conflicts", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_name_conflicts = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_name_conflicts", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Get_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Set_a = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflicts_A_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflicts_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NameConflictsExposed_name_Conflicts_exposed = mrbind_test.Ffi.downcall("", "MR_CSharp_NameConflictsExposed_name_Conflicts_exposed", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonCopyableClassByValueOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonCopyableClassByValueOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_NonTrivialClassOps_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_NonTrivialClassOps_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialClassOps_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialClassOps_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_NonTrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_NonTrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Outer_Inner_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Outer_Inner_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalA = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalB = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedLhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedLhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsMixedRhs_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsMixedRhs_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsE_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsRhsH_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsRhsH_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvFsPath_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvFsPath_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_ConvertTo_std_string = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_ConvertTo_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvString_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvString_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_ConvertTo_std_string_view = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_ConvertTo_std_string_view", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_StringConvStringView_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StringConvStringView_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo_mut = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo_mut", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestConstness_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestConstness_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_static_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_static_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_static_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_static_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_static_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_i", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_i_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_i_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Get_const_s_ref = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Get_const_s_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestFields_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestFields_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_sub_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mul_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_div_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mod_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_xor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitand_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_bitor_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_lshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_rshift_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow_star = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow_star", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_arrow = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_arrow", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_index = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_index", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Call = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f1 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f2 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f3 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f4 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f4", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f5 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f5", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f6 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f6", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Get_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Get_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_GetMutable_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_GetMutable_f7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Set_f7 = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Set_f7", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TestStdFunction_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TestStdFunction_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_TrivialDerived_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_TrivialDerived_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java new file mode 100644 index 00000000..46bfd0e7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +public final class test_custom_preferred_names +{ + private test_custom_preferred_names() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_blah = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Af_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Af_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CustomPrefNames_Ai_Destroy = mrbind_test.Ffi.downcall("", "MR_CustomPrefNames_Ai_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java new file mode 100644 index 00000000..2d1c9ac2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +public final class test_declaration_order +{ + private test_declaration_order() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_c = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_c", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A_B.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_d = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_d", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_a = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_a", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.A.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_A_B_b = mrbind_test.Ffi.downcall("", "MR_DeclOrder_A_B_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_false_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_false_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_true.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_DeclOrder_C_true_blah = mrbind_test.Ffi.downcall("", "MR_DeclOrder_C_true_blah", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.declorder.C_false.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java new file mode 100644 index 00000000..d7791105 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java @@ -0,0 +1,15 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +public final class test_deprecation +{ + private test_deprecation() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Deprecation_foo = mrbind_test.Ffi.downcall("", "MR_Deprecation_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Deprecation_bar = mrbind_test.Ffi.downcall("", "MR_Deprecation_bar", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java new file mode 100644 index 00000000..6d1a532d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -0,0 +1,14 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants +{ + private test_includes_for_enum_constants() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_foo = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java new file mode 100644 index 00000000..6d263071 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_2 +{ + private test_includes_for_enum_constants_2() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy = mrbind_test.Ffi.downcall("", "MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java new file mode 100644 index 00000000..4dc1659c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +public final class test_includes_for_enum_constants_3 +{ + private test_includes_for_enum_constants_3() {} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java new file mode 100644 index 00000000..14b90d68 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +public final class test_iostream +{ + private test_iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_print_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_print_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_input_MR_IOStream_A = mrbind_test.Ffi.downcall("", "MR_C_input_MR_IOStream_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_IOStream_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_IOStream_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_IOStream_A_Destroy = mrbind_test.Ffi.downcall("", "MR_IOStream_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java new file mode 100644 index 00000000..72709289 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -0,0 +1,39 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +public final class test_lifetime_inference +{ + private test_lifetime_inference() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_A = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_begin_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_begin_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_end_MR_LifetimeInference_B = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_end_MR_LifetimeInference_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_begin = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_end = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_A_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Get_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Set_x = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_B_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Construct = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_LifetimeInference_C_Destroy = mrbind_test.Ffi.downcall("", "MR_LifetimeInference_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java new file mode 100644 index 00000000..e9fb1312 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +public final class test_matching_layout +{ + private test_matching_layout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_foo = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_foo", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bar = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bar", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.matchinglayout.B.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_baz = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_bleh = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_bleh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MatchingLayout_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_MatchingLayout_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.matchinglayout.B.LAYOUT)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java new file mode 100644 index 00000000..480d22f7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +public final class test_member_vars +{ + private test_member_vars() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_z", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_z = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_z", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_w = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_w", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Set_x = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_y = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_y", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_ref = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Get_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_MemberVars_A_Destroy = mrbind_test.Ffi.downcall("", "MR_MemberVars_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java new file mode 100644 index 00000000..d101f32e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -0,0 +1,34 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +public final class test_mention_blacklists +{ + private test_mention_blacklists() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo2_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo2_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo3_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo3_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo4_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo4_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_1 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_foo5_0 = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_foo5_0", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_A_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Get_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Set_a = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SignatureFilters_Blah_Destroy = mrbind_test.Ffi.downcall("", "MR_SignatureFilters_Blah_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java new file mode 100644 index 00000000..b63d70c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +public final class test_nested_class_template_inst +{ + private test_nested_class_template_inst() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTemplateInst_A_int_AA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTemplateInst_A_int_AA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java new file mode 100644 index 00000000..151f301e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java @@ -0,0 +1,28 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +public final class test_nested_types +{ + private test_nested_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_b", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_b = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Get_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Get_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_GetMutable_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_GetMutable_e", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Set_e = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Set_e", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_NestedTypes_A_B_Destroy = mrbind_test.Ffi.downcall("", "MR_NestedTypes_A_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java new file mode 100644 index 00000000..528901a3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +public final class test_omitting_template_args_and_quals +{ + private test_omitting_template_args_and_quals() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_b = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_b", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_c = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_c", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_d = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_d", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_inst = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_inst", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_float_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OmittingTargsAndQuals_A_int = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OmittingTargsAndQuals_A_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OmittingTargsAndQuals_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_OmittingTargsAndQuals_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java new file mode 100644 index 00000000..5a68a556 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -0,0 +1,117 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +public final class test_overloaded_operators +{ + private test_overloaded_operators() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_sub_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mul_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_div_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_mod_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_xor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitand_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_bitor_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_lshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_assign_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_rshift_assign_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_arrow_star_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_arrow_star_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_pos_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_pos_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_pos_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_add_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_add_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_neg_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_neg_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mul_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_div_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_div_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_mod_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_mod_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_xor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compl_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_add_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_add_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_sub_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_sub_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mul_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mul_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_div_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_div_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_mod_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_xor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitand_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_bitor_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_lshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_rshift_assign = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_not_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_not_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_greater_equal_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_greater_equal_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_and_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_and_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_or_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_or_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_incr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_incr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_post_decr_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_post_decr_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_comma_MR_OverloadedOps_A = mrbind_test.Ffi.downcall("", "MR_C_comma_MR_OverloadedOps_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow_star = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow_star", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_arrow = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_arrow", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_call = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_index = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_A_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_B_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_C_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_deref_const_MR_OverloadedOps_D_ref = mrbind_test.Ffi.downcall("", "MR_C_deref_const_MR_OverloadedOps_D_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_OverloadedOps_D_Destroy = mrbind_test.Ffi.downcall("", "MR_OverloadedOps_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java new file mode 100644 index 00000000..9dfcbd14 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +public final class test_overloads +{ + private test_overloads() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Overloads_a_1 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_a_2 = mrbind_test.Ffi.downcall("", "MR_Overloads_a_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_int = mrbind_test.Ffi.downcall("", "MR_Overloads_b_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_b_float = mrbind_test.Ffi.downcall("", "MR_Overloads_b_float", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_int = mrbind_test.Ffi.downcall("", "MR_Overloads_c_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_c_float = mrbind_test.Ffi.downcall("", "MR_Overloads_c_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_int = mrbind_test.Ffi.downcall("", "MR_Overloads_d_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_d_float = mrbind_test.Ffi.downcall("", "MR_Overloads_d_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_BYTE, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_BYTE)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_const_int_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_e_const_int_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int_rvalue_ref_int = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int_rvalue_ref_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_e_int_rvalue_ref_float = mrbind_test.Ffi.downcall("", "MR_Overloads_e_int_rvalue_ref_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_float = mrbind_test.Ffi.downcall("", "MR_Overloads_f_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_Overloads_f_const_int_ref = mrbind_test.Ffi.downcall("", "MR_Overloads_f_const_int_ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java new file mode 100644 index 00000000..03f57869 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +public final class test_phmap +{ + private test_phmap() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_flat_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_flat_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_node_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_node_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_parallel_node_hash_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_parallel_node_hash_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_set_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_set_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_map_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_map_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multiset_int = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multiset_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Phmap_foo_phmap_btree_multimap_int_float = mrbind_test.Ffi.downcall("", "MR_Phmap_foo_phmap_btree_multimap_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java new file mode 100644 index 00000000..3fe90d9b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java @@ -0,0 +1,72 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +public final class test_simple_types +{ + private test_simple_types() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetInt = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetIntRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetIntRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetIntRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetConstVoidPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetConstVoidPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetConstVoidPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetVoidPtrPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetVoidPtrPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumPtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumPtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumPtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnumRef", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnumRefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnumRefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2 = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_SHORT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Def = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2PtrDefNull = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2PtrDefNull", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_GetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_GetEnum2Ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2Ref = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2Ref", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_SetEnum2RefDef = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_SetEnum2RefDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckCharMaybeUnsigned = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckCharMaybeUnsigned", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_unsigned_char_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_unsigned_char_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_CheckChar_signed_char_ptr = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_CheckChar_signed_char_ptr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_blah_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_blah_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_FuncTemplate_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_FuncTemplate_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_GetMutable_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_GetMutable_var_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java new file mode 100644 index 00000000..5d44359e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +public final class test_size_t_ptrdiff_t +{ + private test_size_t_ptrdiff_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_uint64_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_uint64_t_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_uint64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_uint64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_int64_t_ptr = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_int64_t_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_foo_std_vector_int64_t = mrbind_test.Ffi.downcall("", "MR_TestSizeT_foo_std_vector_int64_t", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_foo = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TestSizeT_A_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_TestSizeT_A_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java new file mode 100644 index 00000000..f1670f9a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +public final class test_static_memberr +{ + private test_static_memberr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_blah = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StaticFuncs_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StaticFuncs_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java new file mode 100644 index 00000000..cb43f85e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java @@ -0,0 +1,65 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +public final class test_std_containers +{ + private test_std_containers() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdContainers_Set = mrbind_test.Ffi.downcall("", "MR_StdContainers_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdContainers_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_Get = mrbind_test.Ffi.downcall("", "MR_StdContainers_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdContainers_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDeque = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDeque", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetList = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetList", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSet = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSet", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMap = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMap", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArray", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArraySimple = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArraySimple", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimpleParam = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimpleParam", java.lang.foreign.FunctionDescriptor.ofVoid(mrbind_test.mr.cs.std_array_int_43.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_StdArraySimplePtr = mrbind_test.Ffi.downcall("", "MR_StdContainers_StdArraySimplePtr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetWithMergedIters = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetWithMergedIters", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIter = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIter", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMergedIterConst = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMergedIterConst", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefCon = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefCon", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetVectorNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetVectorNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetDequeNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetDequeNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetListNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetListNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiSetNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiSetNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetUnorderedMultiMapNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetUnorderedMultiMapNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayNA = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayNA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_GetStdArrayOfPlainArray = mrbind_test.Ffi.downcall("", "MR_StdContainers_GetStdArrayOfPlainArray", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.cs.std_array_int_array_4_array_3_5.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_less_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_less_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_StdContainers_NonAssignable = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_StdContainers_NonAssignable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Construct = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java new file mode 100644 index 00000000..91102810 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +public final class test_std_expected +{ + private test_std_expected() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExp", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExp = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExp", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVoid", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoid = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoid", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidConstRef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_SetExpVoidDef = mrbind_test.Ffi.downcall("", "MR_StdExpected_SetExpVoidDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdExpected_GetExpVec = mrbind_test.Ffi.downcall("", "MR_StdExpected_GetExpVec", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java new file mode 100644 index 00000000..a1136b31 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +public final class test_std_filesystem +{ + private test_std_filesystem() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_GetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_GetPath", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPath = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPath", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathConstRef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFilesystem_SetPathDef = mrbind_test.Ffi.downcall("", "MR_StdFilesystem_SetPathDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java new file mode 100644 index 00000000..0e68fdf2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +public final class test_std_function +{ + private test_std_function() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_int_int = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_int_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_int_func_from_int_int = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_int_func_from_int_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_std_string_func_from_int_float = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_std_string_func_from_int_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_std_string = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_foo_std_function_MR_StdFunction_A_func = mrbind_test.Ffi.downcall("", "MR_StdFunction_foo_std_function_MR_StdFunction_A_func", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Get_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Get_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_GetMutable_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_GetMutable_a", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Set_a = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Set_a", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java new file mode 100644 index 00000000..7350f68b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java @@ -0,0 +1,49 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +public final class test_std_optional +{ + private test_std_optional() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetInt = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetEnum", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnum = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnum", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetEnumDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetEnumDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_GetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_GetClass2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2 = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2ConstRef = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_SetClass2Def = mrbind_test.Ffi.downcall("", "MR_StdOptional_SetClass2Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Get_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Get_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_GetMutable_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_GetMutable_x", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Set_x = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Set_x", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Get_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Get_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Set_s = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java new file mode 100644 index 00000000..1f445355 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -0,0 +1,57 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_shared_ptr +{ + private test_std_shared_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetIntArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetIntArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42DefTrivial = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42DefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_SetClassArr42Def = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_SetClassArr42Def", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstIntArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstIntArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_GetConstClassArr42 = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_GetConstClassArr42", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java new file mode 100644 index 00000000..f18d09b9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +public final class test_std_string +{ + private test_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdString_Set = mrbind_test.Ffi.downcall("", "MR_StdString_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdString_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_Get = mrbind_test.Ffi.downcall("", "MR_StdString_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdString_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdString_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdString_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java new file mode 100644 index 00000000..6f7e95cb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +public final class test_std_string_view +{ + private test_std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdStringView_Set = mrbind_test.Ffi.downcall("", "MR_StdStringView_Set", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_SetWithDefault = mrbind_test.Ffi.downcall("", "MR_StdStringView_SetWithDefault", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_Get = mrbind_test.Ffi.downcall("", "MR_StdStringView_Get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_WriteToPtr = mrbind_test.Ffi.downcall("", "MR_StdStringView_WriteToPtr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_RvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_RvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdStringView_ConstRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdStringView_ConstRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java new file mode 100644 index 00000000..37f0e2c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +public final class test_std_tuple_like +{ + private test_std_tuple_like() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetPair", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair3 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair4 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair4", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair5 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair5", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetPair6 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetPair6", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_SetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_SetTuple", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple2 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple7 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple7", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdTupleLike_GetTuple8 = mrbind_test.Ffi.downcall("", "MR_StdTupleLike_GetTuple8", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java new file mode 100644 index 00000000..582bbab5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +public final class test_std_unique_ptr +{ + private test_std_unique_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetInt", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetIntArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetIntArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClass", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassLvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassLvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassRvalueConstRef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassRvalueConstRef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetClassArrDef = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetClassArrDef", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstInt = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstInt", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstIntArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstIntArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClass = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClass", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetConstClassArr = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetConstClassArr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_GetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_GetFloat", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloat = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloat", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_SetFloatDefTrivial = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_SetFloatDefTrivial", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java new file mode 100644 index 00000000..b19273f1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +public final class test_tags +{ + private test_tags() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_int = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_less_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_less_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_int = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_int", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_1_std_greater_void = mrbind_test.Ffi.downcall("", "MR_Tags_foo_1_std_greater_void", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_Tags_foo_0 = mrbind_test.Ffi.downcall("", "MR_Tags_foo_0", java.lang.foreign.FunctionDescriptor.ofVoid()); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java new file mode 100644 index 00000000..49fda92e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +public final class test_typedefs_in_templates +{ + private test_typedefs_in_templates() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_bar = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_A_int_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_A_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_foo = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_foo2 = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_foo2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_TypedefsInTemplates_B_int_BB_float_Destroy = mrbind_test.Ffi.downcall("", "MR_TypedefsInTemplates_B_int_BB_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java new file mode 100644 index 00000000..615be225 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java @@ -0,0 +1,40 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +public final class test_using_decls +{ + private test_using_decls() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Construct = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_assign = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Method = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_StaticFunc = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Get_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Set_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_A_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_assign = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Method = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Method", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_StaticFunc = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_StaticFunc", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Get_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Get_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_Field = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Get_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Get_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java new file mode 100644 index 00000000..3c3aae29 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi.MR; + +/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +public final class test_variant +{ + private test_variant() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_StdVariant_foo = mrbind_test.Ffi.downcall("", "MR_StdVariant_foo", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_bar = mrbind_test.Ffi.downcall("", "MR_StdVariant_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_baz = mrbind_test.Ffi.downcall("", "MR_StdVariant_baz", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_StdVariant_blah = mrbind_test.Ffi.downcall("", "MR_StdVariant_blah", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java new file mode 100644 index 00000000..1af4cd30 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +public final class iostream +{ + private iostream() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_GetStdCout = mrbind_test.Ffi.downcall("", "MR_C_GetStdCout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCerr = mrbind_test.Ffi.downcall("", "MR_C_GetStdCerr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdClog = mrbind_test.Ffi.downcall("", "MR_C_GetStdClog", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_GetStdCin = mrbind_test.Ffi.downcall("", "MR_C_GetStdCin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java new file mode 100644 index 00000000..7a31ffe6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_map_int_float +{ + private phmap_btree_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java new file mode 100644 index 00000000..baa503ea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multimap_int_float +{ + private phmap_btree_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java new file mode 100644 index 00000000..75986dae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. Generated by mrbind, do not edit. */ +public final class phmap_btree_multiset_int +{ + private phmap_btree_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java new file mode 100644 index 00000000..5baf0fe1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_btree_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_btree_set_int +{ + private phmap_btree_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_btree_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_btree_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_btree_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_btree_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java new file mode 100644 index 00000000..5749e1a5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_map_int_float +{ + private phmap_flat_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java new file mode 100644 index 00000000..6d89a195 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_flat_hash_set_int +{ + private phmap_flat_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_flat_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_flat_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java new file mode 100644 index 00000000..f1cd0c37 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_map_int_float +{ + private phmap_node_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java new file mode 100644 index 00000000..df37c4b0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_node_hash_set_int +{ + private phmap_node_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_node_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_node_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java new file mode 100644 index 00000000..b33d014d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_map_int_float +{ + private phmap_parallel_flat_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java new file mode 100644 index 00000000..fb82294c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_flat_hash_set_int +{ + private phmap_parallel_flat_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java new file mode 100644 index 00000000..591d728e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_map_int_float +{ + private phmap_parallel_node_hash_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java new file mode 100644 index 00000000..408c9d3b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. Generated by mrbind, do not edit. */ +public final class phmap_parallel_node_hash_set_int +{ + private phmap_parallel_node_hash_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..5cc3ac9a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_A_42 +{ + private std_array_MR_StdContainers_A_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_A_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_A_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..db4ef900 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,23 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +public final class std_array_MR_StdContainers_NonAssignable_42 +{ + private std_array_MR_StdContainers_NonAssignable_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java new file mode 100644 index 00000000..3706ce9b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int_43`. Generated by mrbind, do not edit. */ +public final class std_array_int_43 +{ + private std_array_int_43() {} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java new file mode 100644 index 00000000..0fc9823b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java @@ -0,0 +1,7 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. Generated by mrbind, do not edit. */ +public final class std_array_int_array_4_array_3_5 +{ + private std_array_int_array_4_array_3_5() {} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..5311eb69 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,62 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_deque_MR_StdContainers_NonAssignable +{ + private std_deque_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java new file mode 100644 index 00000000..ecc84603 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java @@ -0,0 +1,71 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_deque_int`. Generated by mrbind, do not edit. */ +public final class std_deque_int +{ + private std_deque_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_deque_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_deque_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_deque_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_deque_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_at = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_deque_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_deque_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..6ddf0f45 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_E1_float +{ + private std_expected_MR_CSharp_E1_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_E1_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_E1_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..b2cc94ec --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_ExposedLayoutSh_float +{ + private std_expected_MR_CSharp_ExposedLayoutSh_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..6c783919 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_ExposedLayout_float +{ + private std_expected_MR_CSharp_ExposedLayout_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..6999846a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_NonTrivial_float +{ + private std_expected_MR_CSharp_NonTrivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..4e81dd0c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_SA_float +{ + private std_expected_MR_CSharp_SA_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_SA_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_SA_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..1bf16ecc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +public final class std_expected_MR_CSharp_Trivial_float +{ + private std_expected_MR_CSharp_Trivial_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_MR_CSharp_Trivial_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_MR_CSharp_Trivial_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java new file mode 100644 index 00000000..92511daf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_int_float`. Generated by mrbind, do not edit. */ +public final class std_expected_int_float +{ + private std_expected_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java new file mode 100644 index 00000000..c090621f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_expected_int_std_string +{ + private std_expected_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java new file mode 100644 index 00000000..14680621 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_expected_void_float`. Generated by mrbind, do not edit. */ +public final class std_expected_void_float +{ + private std_expected_void_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_success = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_success", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_value = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_error = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_error", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_error_mut = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_error_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_expected_void_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_expected_void_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java new file mode 100644 index 00000000..8c29e384 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +public final class std_filesystem_path +{ + private std_filesystem_path() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_string = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_filesystem_path_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_filesystem_path_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..bba6c24a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 +{ + private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..0ff77b94 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC +{ + private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..e64172e5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_A +{ + private std_function_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java new file mode 100644 index 00000000..c1e4eb48 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E +{ + private std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java new file mode 100644 index 00000000..79b0745d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int`. Generated by mrbind, do not edit. */ +public final class std_function_int +{ + private std_function_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java new file mode 100644 index 00000000..1e6eb1a5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_int_from_int_int +{ + private std_function_int_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java new file mode 100644 index 00000000..607bff92 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_int_from_std_string +{ + private std_function_int_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java new file mode 100644 index 00000000..d62144de --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int_ref_from_int_ref_int_rvalue_ref +{ + private std_function_int_ref_from_int_ref_int_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java new file mode 100644 index 00000000..cc8574a7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_function_int_rvalue_ref +{ + private std_function_int_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java new file mode 100644 index 00000000..4a5fc957 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int_float +{ + private std_function_std_string_from_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java new file mode 100644 index 00000000..a2a98cdc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_std_string_from_int_int +{ + private std_function_std_string_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java new file mode 100644 index 00000000..ebfa3a4f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +public final class std_function_void +{ + private std_function_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..2e84d3df --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_MR_StdFunction_A +{ + private std_function_void_from_MR_StdFunction_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java new file mode 100644 index 00000000..b3b475de --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_int_int`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_int_int +{ + private std_function_void_from_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java new file mode 100644 index 00000000..f461d793 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +public final class std_function_void_from_std_string +{ + private std_function_void_from_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..68c6eaea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,59 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_list_MR_StdContainers_NonAssignable +{ + private std_list_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java new file mode 100644 index 00000000..78865bfd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java @@ -0,0 +1,61 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_list_int`. Generated by mrbind, do not edit. */ +public final class std_list_int +{ + private std_list_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_list_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_list_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_push_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_push_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_pop_front = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_pop_front", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_list_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_list_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..5621fc6f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_map_MR_StdContainers_NonAssignable_float +{ + private std_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java new file mode 100644 index 00000000..1654ccdc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java @@ -0,0 +1,53 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_map_int_float`. Generated by mrbind, do not edit. */ +public final class std_map_int_float +{ + private std_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..722ad6f8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_MR_StdContainers_NonAssignable_float +{ + private std_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java new file mode 100644 index 00000000..355b2582 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java @@ -0,0 +1,52 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class std_multimap_int_float +{ + private std_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..1a02113a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_multiset_MR_StdContainers_NonAssignable +{ + private std_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java new file mode 100644 index 00000000..386a415d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +public final class std_multiset_float +{ + private std_multiset_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java new file mode 100644 index 00000000..5e0f7360 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_multiset_int`. Generated by mrbind, do not edit. */ +public final class std_multiset_int +{ + private std_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..2e391f50 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_ExposedLayoutSh +{ + private std_optional_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..10bee38b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_NonTrivial +{ + private std_optional_MR_CSharp_NonTrivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_NonTrivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_NonTrivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..13ff2ba8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_SA +{ + private std_optional_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..cde44112 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_CSharp_Trivial +{ + private std_optional_MR_CSharp_Trivial() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_CSharp_Trivial_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_CSharp_Trivial_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..41f59d25 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_A +{ + private std_optional_MR_StdOptional_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..f091760c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_B +{ + private std_optional_MR_StdOptional_B() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_B_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..26c2b8ea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +public final class std_optional_MR_StdOptional_E +{ + private std_optional_MR_StdOptional_E() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_MR_StdOptional_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_MR_StdOptional_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java new file mode 100644 index 00000000..f64b40a1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_int`. Generated by mrbind, do not edit. */ +public final class std_optional_int +{ + private std_optional_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java new file mode 100644 index 00000000..7420f29f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +public final class std_optional_std_string +{ + private std_optional_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_value_mut = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_value_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_optional_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_optional_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..88f72999 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_MR_StdContainers_NonAssignable_float +{ + private std_pair_const_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java new file mode 100644 index 00000000..34eea1e7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_float`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_float +{ + private std_pair_const_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java new file mode 100644 index 00000000..0db03228 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_ref_const_float_ref +{ + private std_pair_const_int_ref_const_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_ref_const_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_ref_const_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..c5c1d6eb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref +{ + private std_pair_const_int_rvalue_ref_const_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java new file mode 100644 index 00000000..baf401b2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_float`. Generated by mrbind, do not edit. */ +public final class std_pair_int_float +{ + private std_pair_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java new file mode 100644 index 00000000..b31e0d02 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int_ref_float_ref +{ + private std_pair_int_ref_float_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_ref_float_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_ref_float_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..ad8b8edf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_pair_int_rvalue_ref_float_rvalue_ref +{ + private std_pair_int_rvalue_ref_float_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java new file mode 100644 index 00000000..5c6bdcdf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_pair_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_pair_int_std_string +{ + private std_pair_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_first = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_first", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_first_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_first_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_second = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_second", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_second_mut = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_second_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_pair_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_pair_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..57a1ce96 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,35 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_set_MR_StdContainers_NonAssignable +{ + private std_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java new file mode 100644 index 00000000..47712d97 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +public final class std_set_float +{ + private std_set_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java new file mode 100644 index 00000000..d43ec702 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java @@ -0,0 +1,37 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_set_int`. Generated by mrbind, do not edit. */ +public final class std_set_int +{ + private std_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..aae58f97 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh +{ + private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..c17dc3ec --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SA +{ + private std_shared_ptr_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java new file mode 100644 index 00000000..1b41d567 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SB`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SB +{ + private std_shared_ptr_MR_CSharp_SB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java new file mode 100644 index 00000000..036cfd40 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SC`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SC +{ + private std_shared_ptr_MR_CSharp_SC() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java new file mode 100644 index 00000000..08c029bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SD`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SD +{ + private std_shared_ptr_MR_CSharp_SD() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SD_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..5dcf8ce6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SE +{ + private std_shared_ptr_MR_CSharp_SE() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SE_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SE_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java new file mode 100644 index 00000000..6623e802 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SF`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SF +{ + private std_shared_ptr_MR_CSharp_SF() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..00f8de85 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CSharp_SG +{ + private std_shared_ptr_MR_CSharp_SG() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..a1b6747e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_CommonBaseAB +{ + private std_shared_ptr_MR_CommonBaseAB() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..d476159b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A +{ + private std_shared_ptr_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..8ddc8375 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..33a54a0a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..cf59e707 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_CSharp_SA +{ + private std_shared_ptr_const_MR_CSharp_SA() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..3709e4fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A +{ + private std_shared_ptr_const_MR_StdSharedPtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..7fdac6d8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..6326b139 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 +{ + private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java new file mode 100644 index 00000000..5bcd37f5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java @@ -0,0 +1,32 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int +{ + private std_shared_ptr_const_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java new file mode 100644 index 00000000..64626f17 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int_array +{ + private std_shared_ptr_const_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java new file mode 100644 index 00000000..b9725acd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_int_array_42 +{ + private std_shared_ptr_const_int_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_int_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_int_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java new file mode 100644 index 00000000..7aa5bde9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -0,0 +1,27 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_const_void +{ + private std_shared_ptr_const_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructFromMutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignFromMutable = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignFromMutable", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_const_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_const_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java new file mode 100644 index 00000000..49f4c1f5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int +{ + private std_shared_ptr_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructFromValue = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructFromValue", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java new file mode 100644 index 00000000..826444ba --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java @@ -0,0 +1,31 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int_array +{ + private std_shared_ptr_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructFromSize = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructFromSize", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java new file mode 100644 index 00000000..1591a556 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_int_array_42 +{ + private std_shared_ptr_int_array_42() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Assign = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_int_array_42_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_int_array_42_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java new file mode 100644 index 00000000..e4de6a56 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +public final class std_shared_ptr_void +{ + private std_shared_ptr_void() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_get = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_has_value = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_has_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_use_count = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_use_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructNonOwning", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignNonOwning = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignNonOwning", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_ConstructAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_ConstructAliasing", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_AssignAliasing = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_AssignAliasing", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_shared_ptr_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_shared_ptr_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java new file mode 100644 index 00000000..4e0bdf26 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java @@ -0,0 +1,24 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +public final class std_string +{ + private std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_data_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_string_data_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java new file mode 100644 index 00000000..00e81830 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +public final class std_string_view +{ + private std_string_view() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_size = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_data_end = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_data_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_string_view_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_string_view_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java new file mode 100644 index 00000000..8cbe446e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +public final class std_tuple +{ + private std_tuple() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8133ed79 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout +{ + private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..b4af3042 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,17 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..4014137c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,18 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref +{ + private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java new file mode 100644 index 00000000..c9d6cd51 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java @@ -0,0 +1,25 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd +{ + private std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java new file mode 100644 index 00000000..2570ee74 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref +{ + private std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java new file mode 100644 index 00000000..c6fd9ca9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_const_int_std_string +{ + private std_tuple_const_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_const_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_const_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_const_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_const_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java new file mode 100644 index 00000000..101e096b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. Generated by mrbind, do not edit. */ +public final class std_tuple_float_double_int_int +{ + private std_tuple_float_double_int_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_double = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_double", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_double_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_double_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_2 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_3 = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_get_int_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_get_int_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_float_double_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_float_double_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java new file mode 100644 index 00000000..cf2a96b2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java @@ -0,0 +1,20 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int`. Generated by mrbind, do not edit. */ +public final class std_tuple_int +{ + private std_tuple_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java new file mode 100644 index 00000000..ff640e11 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_float`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_float +{ + private std_tuple_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..cfe25e86 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,19 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref +{ + private std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java new file mode 100644 index 00000000..230f58d7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_tuple_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_tuple_int_std_string +{ + private std_tuple_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_Construct = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_tuple_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_tuple_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..5b7a55ab --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A +{ + private std_unique_ptr_MR_StdUniquePtr_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..86f55711 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_MR_StdUniquePtr_A_array +{ + private std_unique_ptr_MR_StdUniquePtr_A_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java new file mode 100644 index 00000000..8faaa5e3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java @@ -0,0 +1,21 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int +{ + private std_unique_ptr_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java new file mode 100644 index 00000000..923576b1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java @@ -0,0 +1,22 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. Generated by mrbind, do not edit. */ +public final class std_unique_ptr_int_array +{ + private std_unique_ptr_int_array() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_AssignFrom = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_AssignFrom", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_get = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_get", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_at = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_release = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_release", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unique_ptr_int_array_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unique_ptr_int_array_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..4b9cd7ac --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_MR_StdContainers_NonAssignable_float +{ + private std_unordered_map_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java new file mode 100644 index 00000000..489ca3d2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java @@ -0,0 +1,51 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_map_int_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_map_int_float +{ + private std_unordered_map_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_map_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_map_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find_or_construct_elem = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find_or_construct_elem", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_map_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_map_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..805d3ea0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float +{ + private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java new file mode 100644 index 00000000..6a18e1d0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java @@ -0,0 +1,50 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. Generated by mrbind, do not edit. */ +public final class std_unordered_multimap_int_float +{ + private std_unordered_multimap_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_find_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_find_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref_key = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref_key", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_deref_value = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_deref_value", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multimap_int_float_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multimap_int_float_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..c33c45fd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_MR_StdContainers_NonAssignable +{ + private std_unordered_multiset_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java new file mode 100644 index 00000000..cdd37291 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_multiset_int`. Generated by mrbind, do not edit. */ +public final class std_unordered_multiset_int +{ + private std_unordered_multiset_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_count = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_count", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_multiset_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_multiset_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..b6f73a1c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_MR_StdContainers_NonAssignable +{ + private std_unordered_set_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java new file mode 100644 index 00000000..e6f1889c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java @@ -0,0 +1,36 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_unordered_set_int`. Generated by mrbind, do not edit. */ +public final class std_unordered_set_int +{ + private std_unordered_set_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_unordered_set_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_unordered_set_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_contains = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_contains", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_find = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_find", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_unordered_set_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_unordered_set_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java new file mode 100644 index 00000000..aa5dac23 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java @@ -0,0 +1,26 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float +{ + private std_variant_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java new file mode 100644 index 00000000..b81afbd9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float_float +{ + private std_variant_int_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_float_1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_1 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_1", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_1_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_1_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java new file mode 100644 index 00000000..9c223896 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java @@ -0,0 +1,30 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. Generated by mrbind, do not edit. */ +public final class std_variant_int_float_std_string +{ + private std_variant_int_float_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_ConstructAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_ConstructAs_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_AssignAs_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_AssignAs_std_string", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_std_string = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_std_string", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_get_std_string_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_get_std_string_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_int_float_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_int_float_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java new file mode 100644 index 00000000..172250fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java @@ -0,0 +1,29 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int_float +{ + private std_variant_std_monostate_int_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_ConstructAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_ConstructAs_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_AssignAs_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_AssignAs_float", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_float = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_get_float_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_get_float_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java new file mode 100644 index 00000000..c34cf2ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java @@ -0,0 +1,33 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. Generated by mrbind, do not edit. */ +public final class std_variant_std_monostate_int_float_float +{ + private std_variant_std_monostate_int_float_float() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_index = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_int", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_std_monostate = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_std_monostate", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_int = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_int_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_int_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_2 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_2", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_3 = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_variant_std_monostate_int_float_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_variant_std_monostate_int_float_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java new file mode 100644 index 00000000..a4e51525 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_A +{ + private std_vector_MR_A() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_A_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_A_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_A_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_A_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f79d0158 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_A_ptr +{ + private std_vector_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..7bd0bb53 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_CSharp_ExposedLayout +{ + private std_vector_MR_CSharp_ExposedLayout() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayout.LAYOUT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..d347fddd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,63 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonAssignable +{ + private std_vector_MR_StdContainers_NonAssignable() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..529230bb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,69 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +public final class std_vector_MR_StdContainers_NonDefaultConstructible +{ + private std_vector_MR_StdContainers_NonDefaultConstructible() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..f8a752ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +public final class std_vector_const_MR_CSharp_A_ptr +{ + private std_vector_const_MR_CSharp_A_ptr() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java new file mode 100644 index 00000000..71acac26 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_int`. Generated by mrbind, do not edit. */ +public final class std_vector_int +{ + private std_vector_int() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java new file mode 100644 index 00000000..02ded0de --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_int64_t`. Generated by mrbind, do not edit. */ +public final class std_vector_int64_t +{ + private std_vector_int64_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_int64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_int64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_int64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_int64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_int64_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_int64_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java new file mode 100644 index 00000000..6d671f05 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java @@ -0,0 +1,70 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. Generated by mrbind, do not edit. */ +public final class std_vector_std_expected_int_std_string +{ + private std_vector_std_expected_int_std_string() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_std_expected_int_std_string_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_std_expected_int_std_string_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java new file mode 100644 index 00000000..cf72279e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java @@ -0,0 +1,74 @@ +package mrbind_test.ffi; + +/** The downcall handles of the C bindings file `std_vector_uint64_t`. Generated by mrbind, do not edit. */ +public final class std_vector_uint64_t +{ + private std_vector_uint64_t() {} + + public static final class H0 + { + private H0() {} + + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_uint64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_uint64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_uint64_t_const_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_uint64_t_const_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_sub_MR_C_std_vector_uint64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_sub_MR_C_std_vector_uint64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_equal_MR_C_std_vector_uint64_t_iterator = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_C_std_vector_uint64_t_iterator", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_ConstructFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_ConstructFromRange", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_AssignFromRange = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_AssignFromRange", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_size = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_size", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_empty = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_empty", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_resize = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_resize", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_resize_with_default_value = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_resize_with_default_value", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_clear = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_clear", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_capacity = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_capacity", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_reserve = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_reserve", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_shrink_to_fit = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_shrink_to_fit", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_at = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_at", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_at_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_at_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_front = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_front", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_front_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_front_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_back", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_back_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_back_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_data = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_data", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_data_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_data_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_push_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_push_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_pop_back = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_pop_back", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase_at_mutable_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase_at_mutable_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_insert_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_insert_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_erase_at_iter = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_erase_at_iter", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_begin = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_begin_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_begin_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_end = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_is_end_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_is_end_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_to_index = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_to_index", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_to_index_mut = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_to_index_mut", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_from_mutable = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_from_mutable", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_const_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_const_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_AssignFromAnother", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_deref = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_deref", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_incr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_incr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_decr = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_decr", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_add_assign = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_LONG)); + public static final java.lang.invoke.MethodHandle MR_C_std_vector_uint64_t_iterator_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_vector_uint64_t_iterator_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java new file mode 100644 index 00000000..0e7b8b0e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java @@ -0,0 +1,149 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_A_AssignFromAnother()`. + */ + public mrbind_test.mr.A assignFromAnother(mrbind_test.mr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_A_Get_x()`. + */ + public mrbind_test.mr.cs.std_string x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::A` named `x`. + * The reference to the parameter `value` might be preserved in this object in element `x`. + * + * Calls `MR_A_Set_x()`. + */ + public void setX(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java new file mode 100644 index 00000000..15628025 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java @@ -0,0 +1,83 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::CommonBaseAB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::SeparateA` + * `MR::SeparateB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CommonBaseAB::CommonBaseAB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CommonBaseAB_ConstructFromAnother()`. + */ + public CommonBaseAB(mrbind_test.mr.CommonBaseAB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CommonBaseAB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CommonBaseAB_AssignFromAnother()`. + */ + public mrbind_test.mr.CommonBaseAB assignFromAnother(mrbind_test.mr.CommonBaseAB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java new file mode 100644 index 00000000..42a7a99a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java @@ -0,0 +1,120 @@ +package mrbind_test.mr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::foo`. + * + * Calls `MR_foo()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_foo.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::bar`. + * + * Calls `MR_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_vector_MR_A _1) + { + try + { + mrbind_test.ffi.MR._1.H0.MR_bar.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generate a `shared_ptr` for this as well, to test how that gets separated. + * Generated from function `MR::mark_shared_common_base_ab`. + * + * Calls `MR_mark_shared_common_base_ab()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB mark_shared_common_base_ab() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_mark_shared_common_base_ab.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecA`. + * + * Calls `MR_GetSeparateVecA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateA GetSeparateVecA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_GetSeparateVecA.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetSeparateVecB`. + * + * Calls `MR_GetSeparateVecB()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_SeparateB GetSeparateVecB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_GetSeparateVecB.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::GetCombinedVecAB`. + * + * Calls `MR_GetCombinedVecAB()`. + */ + public static mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB GetCombinedVecAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_combined_a_b.H0.MR_GetCombinedVecAB.invokeExact(); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java new file mode 100644 index 00000000..a642c4fb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateA`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.A.a.H0.MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateA::SeparateA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateA_ConstructFromAnother()`. + */ + public SeparateA(mrbind_test.mr.SeparateA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateA_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java new file mode 100644 index 00000000..860759b4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java @@ -0,0 +1,81 @@ +package mrbind_test.mr; + +/** + * Generated from class `MR::SeparateB`. + * Base classes: + * Direct: (non-virtual) + * `MR::CommonBaseAB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.B.b.H0.MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::SeparateB::SeparateB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SeparateB_ConstructFromAnother()`. + */ + public SeparateB(mrbind_test.mr.SeparateB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SeparateB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SeparateB_AssignFromAnother()`. + */ + public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java new file mode 100644 index 00000000..67833c53 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java @@ -0,0 +1,34 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::A`. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} + + /** + * Generated from method `MR::AbstractClasses::A::foo`. + * + * Calls `MR_AbstractClasses_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java new file mode 100644 index 00000000..14d768cc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java @@ -0,0 +1,49 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::C` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from method `MR::AbstractClasses::B::foo`. + * + * Calls `MR_AbstractClasses_B_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java new file mode 100644 index 00000000..5712633a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java @@ -0,0 +1,49 @@ +package mrbind_test.mr.abstractclasses; + +/** + * Generated from class `MR::AbstractClasses::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::AbstractClasses::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from method `MR::AbstractClasses::C::foo`. + * + * Calls `MR_AbstractClasses_C_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java new file mode 100644 index 00000000..dd8b19b6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java @@ -0,0 +1,203 @@ +package mrbind_test.mr.adjustingnames; + +/** + * And test that `uint64_t` is correctly adjusted in some other kinds of names. + * Though here we don't really test that each of them brings its own includes. + * Generated from class `MR::AdjustingNames::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_AdjustingNames_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::AdjustingNames::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_AdjustingNames_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.adjustingnames.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::AdjustingNames::A::operator MR_C_uint64_t`. + * + * Calls `MR_AdjustingNames_A_ConvertTo_uint64_t()`. + */ + public long convertTo_uint64_t() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConvertTo_uint64_t.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_AdjustingNames_A_AssignFromAnother()`. + */ + public mrbind_test.mr.adjustingnames.A assignFromAnother(mrbind_test.mr.adjustingnames.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.adjustingnames.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::foo`. + * + * Calls `MR_AdjustingNames_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::AdjustingNames::A::bar`. + * + * Calls `MR_AdjustingNames_A_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::AdjustingNames::A` named `var`. + * + * Calls `MR_AdjustingNames_A_Get_var_uint64_t()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_uint64_t.invokeExact(); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::AdjustingNames::A` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_AdjustingNames_A_Set_var_uint64_t()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_uint64_t.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java new file mode 100644 index 00000000..9c07a3d2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.adjustingnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * When we're gonna call `foo()` in the source file, we must include the header for our typedef (and for the template arguments in general). + * And we must make sure that the typedef gets applied to the name correctly. + * Generated from function `MR::AdjustingNames::foo`. + * + * Calls `MR_AdjustingNames_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::AdjustingNames::bar`. + * + * Calls `MR_AdjustingNames_bar()`. + */ + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_bar.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java new file mode 100644 index 00000000..8cddd608 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java @@ -0,0 +1,219 @@ +package mrbind_test.mr.aggregates; + +/** + * Aggregates get elementwise constructors. This is necessary if their elements are not default-constructible, + * because otherwise there would be no way to construct them. + * Generated from class `MR::Aggregates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::A` elementwise. + * The reference to the parameter `y` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFrom()`. + */ + public A(int x, java.lang.String y) + { + this(__ctor_constructFrom(x, y), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x, java.lang.String y) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_y = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(y, "y")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFrom.invokeExact(x, __str_y, mrbind_test.Ffi.end(__str_y)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.aggregates.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_A_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.A assignFromAnother(mrbind_test.mr.aggregates.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `x`. + * + * Calls `MR_Aggregates_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_A_Get_y()`. + */ + public mrbind_test.mr.cs.std_string y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::A` named `y`. + * The reference to the parameter `value` might be preserved in this object in element `y`. + * + * Calls `MR_Aggregates_A_Set_y()`. + */ + public void setY(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java new file mode 100644 index 00000000..1dbcbb83 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.aggregates; + +/** + * This is an empty aggregate, it doesn't need an elementwise constructor. + * Generated from class `MR::Aggregates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.aggregates.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_B_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.B assignFromAnother(mrbind_test.mr.aggregates.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java new file mode 100644 index 00000000..76e0b102 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java @@ -0,0 +1,477 @@ +package mrbind_test.mr.aggregates; + +/** + * Test the optional limit on the number of fields that we aggregate-initialize. + * Generated from class `MR::Aggregates::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::C` elementwise. + * + * Calls `MR_Aggregates_C_ConstructFrom()`. + */ + public C(int a, int b, int c, int d, int e, int f, int g, int h) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.aggregates.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_C_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.C assignFromAnother(mrbind_test.mr.aggregates.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `a`. + * + * Calls `MR_Aggregates_C_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `b`. + * + * Calls `MR_Aggregates_C_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `c`. + * + * Calls `MR_Aggregates_C_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `d`. + * + * Calls `MR_Aggregates_C_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `e`. + * + * Calls `MR_Aggregates_C_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `f`. + * + * Calls `MR_Aggregates_C_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `g`. + * + * Calls `MR_Aggregates_C_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::C` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_C_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::C` named `h`. + * + * Calls `MR_Aggregates_C_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java new file mode 100644 index 00000000..03f7c1fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java @@ -0,0 +1,520 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Aggregates_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::Aggregates::D` elementwise. + * + * Calls `MR_Aggregates_D_ConstructFrom()`. + */ + public D(int a, int b, int c, int d, int e, int f, int g, int h, int i) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h, i), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h, int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Aggregates::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.aggregates.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_D_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.D assignFromAnother(mrbind_test.mr.aggregates.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `a`. + * + * Calls `MR_Aggregates_D_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `b`. + * + * Calls `MR_Aggregates_D_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `c`. + * + * Calls `MR_Aggregates_D_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `d`. + * + * Calls `MR_Aggregates_D_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `e`. + * + * Calls `MR_Aggregates_D_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `f`. + * + * Calls `MR_Aggregates_D_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `g`. + * + * Calls `MR_Aggregates_D_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `h`. + * + * Calls `MR_Aggregates_D_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::Aggregates::D` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_D_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::Aggregates::D` named `i`. + * + * Calls `MR_Aggregates_D_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java new file mode 100644 index 00000000..e2ad0596 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java @@ -0,0 +1,569 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::E`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.aggregates.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::Aggregates::E` elementwise. + * The reference to the parameter `j` might be preserved in the constructed object. + * + * Calls `MR_Aggregates_E_ConstructFrom()`. + */ + public E(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + this(__ctor_constructFrom(a, b, c, d, e, f, g, h, i, j), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b, int c, int d, int e, int f, int g, int h, int i, mrbind_test.mr.aggregates.NonDefaultConstructible j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i, mrbind_test.Ffi.ptrNonNull(j, "j")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(j); + } + } + + /** + * Generated from method `MR::Aggregates::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_E_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.E assignFromAnother(mrbind_test.mr.aggregates.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_a()`. + */ + public int a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `a`. + * + * Calls `MR_Aggregates_E_Set_a()`. + */ + public void setA(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_b()`. + */ + public int b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `b`. + * + * Calls `MR_Aggregates_E_Set_b()`. + */ + public void setB(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_c()`. + */ + public int c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `c`. + * + * Calls `MR_Aggregates_E_Set_c()`. + */ + public void setC(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_d()`. + */ + public int d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `d`. + * + * Calls `MR_Aggregates_E_Set_d()`. + */ + public void setD(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_e()`. + */ + public int e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `e`. + * + * Calls `MR_Aggregates_E_Set_e()`. + */ + public void setE(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `f`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_f()`. + */ + public int f() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `f`. + * + * Calls `MR_Aggregates_E_Set_f()`. + */ + public void setF(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `g`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_g()`. + */ + public int g() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `g`. + * + * Calls `MR_Aggregates_E_Set_g()`. + */ + public void setG(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `h`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_h()`. + */ + public int h() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `h`. + * + * Calls `MR_Aggregates_E_Set_h()`. + */ + public void setH(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `i`. + * + * Calls `MR_Aggregates_E_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Returns a pointer to a member variable of class `MR::Aggregates::E` named `j`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_Aggregates_E_Get_j()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible j() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * This gets the ctor anyway, because `j` would otherwise make it non-default-constructible. + * Modifies a member variable of class `MR::Aggregates::E` named `j`. + * The reference to the parameter `value` might be preserved in this object in element `j`. + * + * Calls `MR_Aggregates_E_Set_j()`. + */ + public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java new file mode 100644 index 00000000..2c1975e4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java @@ -0,0 +1,78 @@ +package mrbind_test.mr.aggregates; + +/** + * Generated from class `MR::Aggregates::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::Aggregates::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Aggregates::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Aggregates_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.aggregates.NonDefaultConstructible assignFromAnother(mrbind_test.mr.aggregates.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java new file mode 100644 index 00000000..a100b584 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java @@ -0,0 +1,114 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::A`. + * Derived classes: + * Virtual: + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * `MR::Bases::H` + * Indirect: (non-virtual) + * `MR::Bases::B2` + * Ambiguous: + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.bases.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_A_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.A assignFromAnother(mrbind_test.mr.bases.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java new file mode 100644 index 00000000..396fb8d5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java @@ -0,0 +1,110 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::B2` + * `MR::Bases::D` + * `MR::Bases::D2` + * `MR::Bases::D3` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.bases.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java new file mode 100644 index 00000000..5e992aa0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::B2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Indirect: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_B2_DefaultConstruct()`. + */ + public B2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::B2::B2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_B2_ConstructFromAnother()`. + */ + public B2(mrbind_test.mr.bases.B2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::B2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_B2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.B2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java new file mode 100644 index 00000000..a7d62d1c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::Bases::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.bases.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_C_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java new file mode 100644 index 00000000..31d7a8b3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * `MR::Bases::C` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.bases.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D assignFromAnother(mrbind_test.mr.bases.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java new file mode 100644 index 00000000..75d36cd7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D2`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D2 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D2(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D2::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D2_DefaultConstruct()`. + */ + public D2() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D2::D2`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D2_ConstructFromAnother()`. + */ + public D2(mrbind_test.mr.bases.D2 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D2::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D2_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D2 assignFromAnother(mrbind_test.mr.bases.D2 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D2(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java new file mode 100644 index 00000000..e8f31dbb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::D3`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::B` + * Ambiguous: + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D3 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D3(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D3::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_D3_DefaultConstruct()`. + */ + public D3() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::D3::D3`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_D3_ConstructFromAnother()`. + */ + public D3(mrbind_test.mr.bases.D3 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::D3::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_D3_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.D3 assignFromAnother(mrbind_test.mr.bases.D3 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.D3(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java new file mode 100644 index 00000000..fd4f95ab --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::E`. + * Derived classes: + * Non-virtual along a virtual path: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * Direct: (non-virtual) + * `MR::Bases::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.bases.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_E_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.E assignFromAnother(mrbind_test.mr.bases.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java new file mode 100644 index 00000000..1fb06238 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java @@ -0,0 +1,109 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::Bases::E` + * Derived classes: + * Virtual: + * `MR::Bases::G` + * `MR::Bases::H` + * `MR::Bases::I` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.bases.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_F_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java new file mode 100644 index 00000000..22ddd4d1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java @@ -0,0 +1,106 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::G`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.bases.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_G_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java new file mode 100644 index 00000000..201dfda9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java @@ -0,0 +1,108 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::H`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * Direct: (non-virtual) + * `MR::Bases::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.bases.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_H_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java new file mode 100644 index 00000000..b4c1d375 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.bases; + +/** + * Generated from class `MR::Bases::I`. + * Base classes: + * Virtual: + * `MR::Bases::F` + * `MR::Bases::A` + * Non-virtual along a virtual path: + * `MR::Bases::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_Bases_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::Bases::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_Bases_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.bases.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::Bases::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_Bases_I_AssignFromAnother()`. + */ + public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.bases.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java new file mode 100644 index 00000000..447c528d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.convops; + +/** + * Generated from class `MR::ConvOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_ConvOps_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::ConvOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_ConvOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.convops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::ConvOps::A::operator bool`. + * + * Calls `MR_ConvOps_A_ConvertTo_bool()`. + */ + public boolean convertTo_bool() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConvertTo_bool.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::ConvOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_ConvOps_A_AssignFromAnother()`. + */ + public mrbind_test.mr.convops.A assignFromAnother(mrbind_test.mr.convops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.convops.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java new file mode 100644 index 00000000..b861127d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -0,0 +1,280 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::A`. + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::A` elementwise. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFrom()`. + */ + public A(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFrom.invokeExact(Field); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.copyinheritedmembers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::A::operator int`. + * + * Calls `MR_CopyInheritedMembers_A_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.A assignFromAnother(mrbind_test.mr.copyinheritedmembers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::Method`. + * + * Calls `MR_CopyInheritedMembers_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::A::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_A_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::A` named `Field`. + * + * Calls `MR_CopyInheritedMembers_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java new file mode 100644 index 00000000..b7fdff64 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -0,0 +1,270 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::B`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::C` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CopyInheritedMembers::B` elementwise. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFrom()`. + */ + public B(int Field) + { + this(__ctor_constructFrom(Field), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFrom.invokeExact(Field); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.copyinheritedmembers.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::B::operator int`. + * + * Calls `MR_CopyInheritedMembers_B_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_B_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.B assignFromAnother(mrbind_test.mr.copyinheritedmembers.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::Method`. + * + * Calls `MR_CopyInheritedMembers_B_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::B::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_B_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_B_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_B_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::B` named `Field`. + * + * Calls `MR_CopyInheritedMembers_B_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java new file mode 100644 index 00000000..012b1910 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::C`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.copyinheritedmembers.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_C_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.copyinheritedmembers.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java new file mode 100644 index 00000000..c365bde3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -0,0 +1,247 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::D`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::B` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::E` + * `MR::CopyInheritedMembers::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.copyinheritedmembers.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::D::operator int`. + * + * Calls `MR_CopyInheritedMembers_D_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_D_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.copyinheritedmembers.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::Method`. + * + * Calls `MR_CopyInheritedMembers_D_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::D::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_D_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::D` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_D_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::D` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_D_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::D` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_D_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::D` named `Field`. + * + * Calls `MR_CopyInheritedMembers_D_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java new file mode 100644 index 00000000..a7c27e18 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::E`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * `MR::CopyInheritedMembers::D` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.copyinheritedmembers.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_E_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.copyinheritedmembers.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java new file mode 100644 index 00000000..0bf68086 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::D` + * `MR::CopyInheritedMembers::A` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.copyinheritedmembers.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_F_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.copyinheritedmembers.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java new file mode 100644 index 00000000..fa0f297d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::G`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::H` + * `MR::CopyInheritedMembers::I` + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.copyinheritedmembers.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::G::operator int`. + * + * Calls `MR_CopyInheritedMembers_G_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_G_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.copyinheritedmembers.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::Method`. + * + * Calls `MR_CopyInheritedMembers_G_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::G::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_G_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::G` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_G_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::G` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_G_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::G` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_G_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::G` named `Field`. + * + * Calls `MR_CopyInheritedMembers_G_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java new file mode 100644 index 00000000..494edd54 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -0,0 +1,245 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::H`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class H extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public H(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? H::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_H_DefaultConstruct()`. + */ + public H() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::H::H`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_H_ConstructFromAnother()`. + */ + public H(mrbind_test.mr.copyinheritedmembers.H _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::H::operator int`. + * + * Calls `MR_CopyInheritedMembers_H_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_H_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.copyinheritedmembers.H _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::Method`. + * + * Calls `MR_CopyInheritedMembers_H_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::H::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_H_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::H` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_H_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::H` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_H_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::H` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_H_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::H` named `Field`. + * + * Calls `MR_CopyInheritedMembers_H_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java new file mode 100644 index 00000000..39d61d32 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -0,0 +1,245 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::I`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class I extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public I(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? I::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_I_DefaultConstruct()`. + */ + public I() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::I::I`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_I_ConstructFromAnother()`. + */ + public I(mrbind_test.mr.copyinheritedmembers.I _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::I::operator int`. + * + * Calls `MR_CopyInheritedMembers_I_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_I_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.copyinheritedmembers.I _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::Method`. + * + * Calls `MR_CopyInheritedMembers_I_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::I::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_I_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::I` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_I_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::I` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_I_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::I` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_I_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::I` named `Field`. + * + * Calls `MR_CopyInheritedMembers_I_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java new file mode 100644 index 00000000..d361cc7b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -0,0 +1,251 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::J`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Virtual: + * `MR::CopyInheritedMembers::M` + * `MR::CopyInheritedMembers::N` + * `MR::CopyInheritedMembers::O` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::K` + * `MR::CopyInheritedMembers::L` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class J extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public J(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? J::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_J_DefaultConstruct()`. + */ + public J() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::J::J`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_J_ConstructFromAnother()`. + */ + public J(mrbind_test.mr.copyinheritedmembers.J _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::J::operator int`. + * + * Calls `MR_CopyInheritedMembers_J_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_J_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.copyinheritedmembers.J _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::Method`. + * + * Calls `MR_CopyInheritedMembers_J_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::J::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_J_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::J` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_J_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::J` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_J_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::J` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_J_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::J` named `Field`. + * + * Calls `MR_CopyInheritedMembers_J_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java new file mode 100644 index 00000000..3230b2ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::K`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::G` + * `MR::CopyInheritedMembers::J` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class K extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public K(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? K::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_K_DefaultConstruct()`. + */ + public K() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::K::K`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_K_ConstructFromAnother()`. + */ + public K(mrbind_test.mr.copyinheritedmembers.K _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::K::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_K_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.K assignFromAnother(mrbind_test.mr.copyinheritedmembers.K _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.K(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java new file mode 100644 index 00000000..5cc2c84f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java @@ -0,0 +1,107 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::L`. + * Base classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::J` + * `MR::CopyInheritedMembers::G` + * Ambiguous: + * `MR::CopyInheritedMembers::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class L extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public L(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? L::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_L_DefaultConstruct()`. + */ + public L() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::L::L`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_L_ConstructFromAnother()`. + */ + public L(mrbind_test.mr.copyinheritedmembers.L _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::L::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_L_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.L assignFromAnother(mrbind_test.mr.copyinheritedmembers.L _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.L(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java new file mode 100644 index 00000000..9f7d509d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -0,0 +1,251 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Now test that a non-virtual base of a virtual base gets treated as a virtual. + * Generated from class `MR::CopyInheritedMembers::M`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class M extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public M(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? M::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_M_DefaultConstruct()`. + */ + public M() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::M::M`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_M_ConstructFromAnother()`. + */ + public M(mrbind_test.mr.copyinheritedmembers.M _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::M::operator int`. + * + * Calls `MR_CopyInheritedMembers_M_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_M_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.copyinheritedmembers.M _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::Method`. + * + * Calls `MR_CopyInheritedMembers_M_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::M::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_M_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::M` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_M_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::M` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_M_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::M` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_M_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::M` named `Field`. + * + * Calls `MR_CopyInheritedMembers_M_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java new file mode 100644 index 00000000..fc81cb22 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -0,0 +1,250 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::N`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::M` + * Derived classes: + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::O` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class N extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public N(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? N::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_N_DefaultConstruct()`. + */ + public N() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::N::N`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_N_ConstructFromAnother()`. + */ + public N(mrbind_test.mr.copyinheritedmembers.N _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::N::operator int`. + * + * Calls `MR_CopyInheritedMembers_N_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_N_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.copyinheritedmembers.N _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::Method`. + * + * Calls `MR_CopyInheritedMembers_N_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::N::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_N_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::N` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_N_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::N` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_N_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::N` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_N_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::N` named `Field`. + * + * Calls `MR_CopyInheritedMembers_N_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java new file mode 100644 index 00000000..1e9489ed --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.copyinheritedmembers; + +/** + * Generated from class `MR::CopyInheritedMembers::O`. + * Base classes: + * Virtual: + * `MR::CopyInheritedMembers::J` + * Non-virtual along a virtual path: + * `MR::CopyInheritedMembers::A` + * Direct: (non-virtual) + * `MR::CopyInheritedMembers::N` + * Indirect: (non-virtual) + * `MR::CopyInheritedMembers::M` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class O extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public O(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? O::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CopyInheritedMembers_O_DefaultConstruct()`. + */ + public O() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CopyInheritedMembers::O::O`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CopyInheritedMembers_O_ConstructFromAnother()`. + */ + public O(mrbind_test.mr.copyinheritedmembers.O _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CopyInheritedMembers::O::operator int`. + * + * Calls `MR_CopyInheritedMembers_O_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CopyInheritedMembers_O_AssignFromAnother()`. + */ + public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.copyinheritedmembers.O _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::Method`. + * + * Calls `MR_CopyInheritedMembers_O_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CopyInheritedMembers::O::StaticFunc`. + * + * Calls `MR_CopyInheritedMembers_O_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::O` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_O_Get_StaticField()`. + */ + public static int StaticField() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_StaticField.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::O` named `StaticField`. + * + * Calls `MR_CopyInheritedMembers_O_Set_StaticField()`. + */ + public static void setStaticField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_StaticField.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CopyInheritedMembers::O` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CopyInheritedMembers_O_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CopyInheritedMembers::O` named `Field`. + * + * Calls `MR_CopyInheritedMembers_O_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java new file mode 100644 index 00000000..d54d8b08 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java @@ -0,0 +1,2568 @@ +package mrbind_test.mr.cs; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrbind_test.mr.cs.std_vector_MR_A_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_A_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_A_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_test.mr.cs.std_vector_MR_A_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator a, mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Returns the `stdout` stream. + * + * Calls `MR_C_GetStdCout()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCout.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, buffered. + * + * Calls `MR_C_GetStdCerr()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdCerr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCerr.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stderr` stream, unbuffered. + * + * Calls `MR_C_GetStdClog()`. + */ + public static mrbind_test.mr.cs.std_ostream GetStdClog() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdClog.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns the `stdin` stream. + * + * Calls `MR_C_GetStdCin()`. + */ + public static mrbind_test.mr.cs.std_istream GetStdCin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCin.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_istream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator a, mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_node_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_node_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator a, mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_set_int_const_iterator a, mrbind_test.phmap.phmap_btree_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_equal_MR_C_phmap_btree_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator a, mrbind_test.phmap.phmap_btree_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_iterator a, mrbind_test.phmap.phmap_btree_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator a, mrbind_test.phmap.phmap_btree_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator a, mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator a, mrbind_test.phmap.phmap_btree_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_uint64_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_uint64_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_uint64_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_uint64_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbind_test.mr.cs.std_vector_uint64_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int64_t_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, mrbind_test.mr.cs.std_vector_int64_t_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int64_t_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, mrbind_test.mr.cs.std_vector_int64_t_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int64_t_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind_test.mr.cs.std_vector_int64_t_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int64_t_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind_test.mr.cs.std_vector_int64_t_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int_const_iterator a, mrbind_test.mr.cs.std_vector_int_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_const_iterator a, mrbind_test.mr.cs.std_vector_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_int_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_int_iterator a, mrbind_test.mr.cs.std_vector_int_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_iterator a, mrbind_test.mr.cs.std_vector_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int_const_iterator a, mrbind_test.mr.cs.std_deque_int_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_const_iterator a, mrbind_test.mr.cs.std_deque_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_int_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind_test.mr.cs.std_deque_int_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind_test.mr.cs.std_deque_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int_const_iterator a, mrbind_test.mr.cs.std_list_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_int_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_int_iterator a, mrbind_test.mr.cs.std_list_int_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_int_const_iterator a, mrbind_test.mr.cs.std_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_equal_MR_C_std_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_int_const_iterator a, mrbind_test.mr.cs.std_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_equal_MR_C_std_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_int_const_iterator a, mrbind_test.mr.cs.std_unordered_set_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_equal_MR_C_std_unordered_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_const_iterator a, mrbind_test.mr.cs.std_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_iterator a, mrbind_test.mr.cs.std_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_const_iterator a, mrbind_test.mr.cs.std_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_iterator a, mrbind_test.mr.cs.std_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_iterator a, mrbind_test.mr.cs.std_unordered_map_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_float_const_iterator a, mrbind_test.mr.cs.std_multiset_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_equal_MR_C_std_multiset_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_float_const_iterator a, mrbind_test.mr.cs.std_set_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_equal_MR_C_std_set_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator a, mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator a, mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator a, mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two const iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two const iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Computes the signed difference between two mutable iterators. Completes in constant time. + * + * Calls `MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator()`. + */ + public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator b) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Compares two mutable iterators for equality. + * + * Calls `MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator()`. + */ + public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator a, mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator b) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java new file mode 100644 index 00000000..403ce62b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java @@ -0,0 +1,285 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::A` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_A_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_A_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_A_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_A_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother()`. + */ + public std_array_MR_StdContainers_A_42(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 other) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at()`. + */ + public mrbind_test.mr.stdcontainers.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_A_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java new file mode 100644 index 00000000..57e3e512 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java @@ -0,0 +1,234 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `MR::StdContainers::NonAssignable` of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_MR_StdContainers_NonAssignable_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_MR_StdContainers_NonAssignable_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_array_MR_StdContainers_NonAssignable_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct()`. + */ + public std_array_MR_StdContainers_NonAssignable_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_43.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_43.java new file mode 100644 index 00000000..780fe945 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_43.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int` of size 43. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int_43 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(43, java.lang.foreign.ValueLayout.JAVA_INT)}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 172, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int_43(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int_43 copy() {return new std_array_int_43(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int_43 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4);} + public void setElems(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (java.util.Objects.checkIndex(i0, 43)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int_43() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java new file mode 100644 index 00000000..ec688e4c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_int_array_4_array_3_5.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.cs; + +/** + * A fixed-size array of `int[3][4]` of size 5. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_array_int_array_4_array_3_5 extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"elems"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.ValueLayout.JAVA_INT)))}); + public static final long OFF_elems = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("elems")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 240, 4, "std::array");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_array_int_array_4_array_3_5(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public std_array_int_array_4_array_3_5 copy() {return new std_array_int_array_4_array_3_5(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(std_array_int_array_4_array_3_5 other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int elems(int i0, int i1, int i2) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4);} + public void setElems(int i0, int i1, int i2, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_elems + (((java.util.Objects.checkIndex(i0, 5)) * 3 + java.util.Objects.checkIndex(i1, 3)) * 4 + java.util.Objects.checkIndex(i2, 4)) * 4, value);} + + /** Zero-initialized. */ + public std_array_int_array_4_array_3_5() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..364c23ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java @@ -0,0 +1,647 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..839bd273 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_deque_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..794591d9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_deque_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java new file mode 100644 index 00000000..f158d991 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java @@ -0,0 +1,832 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::deque`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_DefaultConstruct()`. + */ + public std_deque_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_ConstructFromAnother()`. + */ + public std_deque_int(mrbind_test.mr.cs.std_deque_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_deque_int_ConstructFromRange()`. + */ + public std_deque_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_deque_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_deque_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_deque_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_deque_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_deque_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_deque_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_deque_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_deque_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * + * Calls `MR_C_std_deque_int_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_front.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_deque_int_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_deque_int_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_deque_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_deque_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_deque_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_deque_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_begin()`. + */ + public mrbind_test.mr.cs.std_deque_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_deque_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_end()`. + */ + public mrbind_test.mr.cs.std_deque_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_deque_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_deque_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_deque_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_deque_int_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_deque_int_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java new file mode 100644 index 00000000..c56c6b8a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_deque_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_const_iterator_DefaultConstruct()`. + */ + public std_deque_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_const_iterator_ConstructFromAnother()`. + */ + public std_deque_int_const_iterator(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_deque_int_const_iterator_from_mutable()`. + */ + public std_deque_int_const_iterator(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_deque_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_deque_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_deque_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java new file mode 100644 index 00000000..b701eaf1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_deque_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_deque_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_deque_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_deque_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_deque_int_iterator_DefaultConstruct()`. + */ + public std_deque_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_deque_int_iterator_ConstructFromAnother()`. + */ + public std_deque_int_iterator(mrbind_test.mr.cs.std_deque_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_deque_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_deque_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_iterator other) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_deque_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_deque_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_deque_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_deque_int_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java new file mode 100644 index 00000000..aedaaba7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::E1` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_E1_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_E1_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_E1_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_E1_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_E1_float(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_value()`. + */ + public mrbind_test.mr.csharp.E1 value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::E1`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_E1_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java new file mode 100644 index 00000000..44828f77 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayoutSh` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_ExposedLayoutSh_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_ExposedLayoutSh_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_ExposedLayoutSh_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_ExposedLayoutSh_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_ExposedLayoutSh_float(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayoutSh`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java new file mode 100644 index 00000000..793fc3eb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::ExposedLayout` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_ExposedLayout_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_ExposedLayout_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_ExposedLayout_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_ExposedLayout_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_ExposedLayout_float(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::ExposedLayout`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java new file mode 100644 index 00000000..dfc930dd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::NonTrivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_NonTrivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_NonTrivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_NonTrivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_NonTrivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_NonTrivial_float(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::NonTrivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java new file mode 100644 index 00000000..b51749e5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::SA` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_SA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_SA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_SA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_SA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_SA_float(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::SA`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_SA_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java new file mode 100644 index 00000000..891bc539 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `MR::CSharp::Trivial` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_MR_CSharp_Trivial_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_MR_CSharp_Trivial_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_MR_CSharp_Trivial_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct()`. + */ + public std_expected_MR_CSharp_Trivial_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother()`. + */ + public std_expected_MR_CSharp_Trivial_float(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float other) + { + try + { + mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `MR::CSharp::Trivial`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_MR_CSharp_Trivial_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java new file mode 100644 index 00000000..3e682ecb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int` that represents success or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_int_float_DefaultConstruct()`. + */ + public std_expected_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_int_float_ConstructFromAnother()`. + */ + public std_expected_int_float(mrbind_test.mr.cs.std_expected_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_float other) + { + try + { + mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_int_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java new file mode 100644 index 00000000..458142b1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a `int` that represents success or a `std::string` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_int_std_string_DefaultConstruct()`. + */ + public std_expected_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_int_std_string_ConstructFromAnother()`. + */ + public std_expected_int_std_string(mrbind_test.mr.cs.std_expected_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_std_string other) + { + try + { + mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_int_std_string_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_error()`. + */ + public mrbind_test.mr.cs.std_string error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents success, returns the stored `int`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `std::string`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_int_std_string_error_mut()`. + */ + public mrbind_test.mr.cs.std_string error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java new file mode 100644 index 00000000..b7210b05 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.cs; + +/** + * Stores either nothing (which represents success) or a `float` that represents an error. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_expected_void_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_expected_void_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_expected_void_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_expected_void_float_DefaultConstruct()`. + */ + public std_expected_void_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_expected_void_float_ConstructFromAnother()`. + */ + public std_expected_void_float(mrbind_test.mr.cs.std_expected_void_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_expected_void_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_expected_void_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_expected_void_float other) + { + try + { + mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance represents success, or false if it represents an error. + * + * Calls `MR_C_std_expected_void_float_success()`. + */ + public boolean success() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_success.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores nothing (which represents success). + * + * Calls `MR_C_std_expected_void_float_value()`. + */ + public boolean value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_void_float_error()`. + */ + public java.lang.Float error() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * If this instance represents an error, returns the stored `float`. Otherwise null. This version returns a mutable pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_expected_void_float_error_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment error_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java new file mode 100644 index 00000000..23673da5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.cs; + +/** + * Stores a filesystem path. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_filesystem_path extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_filesystem_path(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_filesystem_path::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_filesystem_path_DefaultConstruct()`. + */ + public std_filesystem_path() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_filesystem_path_ConstructFromAnother()`. + */ + public std_filesystem_path(mrbind_test.mr.cs.std_filesystem_path other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_filesystem_path_ConstructFrom()`. + */ + public std_filesystem_path(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_filesystem_path_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_filesystem_path other) + { + try + { + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_filesystem_path_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Get the contents as a UTF8-encoded string. + * + * Calls `MR_C_std_filesystem_path_string()`. + */ + public mrbind_test.mr.cs.std_string string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_string.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java new file mode 100644 index 00000000..64c10005 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::E1(MR::CSharp::E1)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_E1_from_MR_CSharp_E1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_E1_from_MR_CSharp_E1(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call()`. + */ + public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call.invokeExact(rawPointer(), java.util.Objects.requireNonNull(_1, "_1").value); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java new file mode 100644 index 00000000..4da61b51 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::CSharp::ExposedLayoutC(MR::CSharp::ExposedLayoutC)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother()`. + */ + public std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC other) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.csharp.ExposedLayoutC(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java new file mode 100644 index 00000000..74e62668 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::A(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_A(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_A_call()`. + */ + public mrbind_test.mr.stdfunction.A call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_call.invokeExact(rawPointer()); + return new mrbind_test.mr.stdfunction.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java new file mode 100644 index 00000000..b65c7467 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `MR::StdFunction::E(int, MR::StdFunction::E)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_MR_StdFunction_E_from_int_MR_StdFunction_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct()`. + */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother()`. + */ + public std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E other) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call()`. + */ + public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call.invokeExact(rawPointer(), _1, java.util.Objects.requireNonNull(_2, "_2").value); + return mrbind_test.mr.stdfunction.E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java new file mode 100644 index 00000000..26f6ee1c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_DefaultConstruct()`. + */ + public std_function_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_ConstructFromAnother()`. + */ + public std_function_int(mrbind_test.mr.cs.std_function_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int other) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_call()`. + */ + public int call() + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_call.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java new file mode 100644 index 00000000..81b05ba9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_from_int_int_DefaultConstruct()`. + */ + public std_function_int_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_from_int_int_ConstructFromAnother()`. + */ + public std_function_int_from_int_int(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_from_int_int_call()`. + */ + public int call(int _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_call.invokeExact(rawPointer(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java new file mode 100644 index 00000000..bec529cf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_from_std_string_DefaultConstruct()`. + */ + public std_function_int_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_from_std_string_ConstructFromAnother()`. + */ + public std_function_int_from_std_string(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_from_std_string_call()`. + */ + public int call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java new file mode 100644 index 00000000..65b0ef90 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int &(int &, int &&)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_ref_from_int_ref_int_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_ref_from_int_ref_int_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_ref_from_int_ref_int_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int_ref_from_int_ref_int_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int_ref_from_int_ref_int_rvalue_ref(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call.invokeExact(rawPointer(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java new file mode 100644 index 00000000..fb23a157 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `int &&(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_int_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_int_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_int_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_int_rvalue_ref_DefaultConstruct()`. + */ + public std_function_int_rvalue_ref() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_int_rvalue_ref_ConstructFromAnother()`. + */ + public std_function_int_rvalue_ref(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_int_rvalue_ref_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_int_rvalue_ref other) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_int_rvalue_ref_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_int_rvalue_ref_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_int_rvalue_ref_call()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment call() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_call.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java new file mode 100644 index 00000000..bc2f5f59 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int, float)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int_float_DefaultConstruct()`. + */ + public std_function_std_string_from_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int_float_ConstructFromAnother()`. + */ + public std_function_std_string_from_int_float(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_float other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int_float_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int_float_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int_float_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_call.invokeExact(rawPointer(), _1, _2); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java new file mode 100644 index 00000000..ab9902d2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `std::string(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_std_string_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_std_string_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_std_string_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_std_string_from_int_int_DefaultConstruct()`. + */ + public std_function_std_string_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_std_string_from_int_int_ConstructFromAnother()`. + */ + public std_function_std_string_from_int_int(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_std_string_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_std_string_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_std_string_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_std_string_from_int_int_call()`. + */ + public mrbind_test.mr.cs.std_string call(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_call.invokeExact(rawPointer(), _1, _2); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java new file mode 100644 index 00000000..583639ae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java @@ -0,0 +1,163 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(void)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_DefaultConstruct()`. + */ + public std_function_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_ConstructFromAnother()`. + */ + public std_function_void(mrbind_test.mr.cs.std_function_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void other) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_call()`. + */ + public void call() + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_call.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java new file mode 100644 index 00000000..3523af97 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(MR::StdFunction::A)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_MR_StdFunction_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_MR_StdFunction_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_MR_StdFunction_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct()`. + */ + public std_function_void_from_MR_StdFunction_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother()`. + */ + public std_function_void_from_MR_StdFunction_A(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A other) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_call()`. + */ + public void call(mrbind_test.mr.stdfunction.A _1) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java new file mode 100644 index 00000000..947007ae --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java @@ -0,0 +1,163 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(int, int)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_int_int_DefaultConstruct()`. + */ + public std_function_void_from_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_int_int_ConstructFromAnother()`. + */ + public std_function_void_from_int_int(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_int_int other) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_int_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_int_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_int_int_call()`. + */ + public void call(int _1, int _2) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_call.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java new file mode 100644 index 00000000..7bb6b3e1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Stores a functor of type: `void(std::string)`. Possibly stateful. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_function_void_from_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_function_void_from_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_function_void_from_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_function_void_from_std_string_DefaultConstruct()`. + */ + public std_function_void_from_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructFromAnother()`. + */ + public std_function_void_from_std_string(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_function_void_from_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_std_string other) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores a callable, as opposed to being null. + * + * Calls `MR_C_std_function_void_from_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Destroys the stored callable, making this instance null. + * + * Calls `MR_C_std_function_void_from_std_string_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Calls the stored callable. + * + * Calls `MR_C_std_function_void_from_std_string_call()`. + */ + public void call(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_istream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_istream.java new file mode 100644 index 00000000..3b52c064 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_istream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ input stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_istream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_istream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..61393950 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java @@ -0,0 +1,667 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonAssignable value) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_push_front()`. + */ + public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position, mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..dbd2bee2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_list_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..fdf69831 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_list_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java new file mode 100644 index 00000000..43201629 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java @@ -0,0 +1,698 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::list`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_DefaultConstruct()`. + */ + public std_list_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_ConstructFromAnother()`. + */ + public std_list_int(mrbind_test.mr.cs.std_list_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_list_int_ConstructFromRange()`. + */ + public std_list_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_list_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_list_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_list_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_list_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_list_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_list_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_list_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_list_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the beginning. + * + * Calls `MR_C_std_list_int_push_front()`. + */ + public void push_front(int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_front.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the beginning. + * + * Calls `MR_C_std_list_int_pop_front()`. + */ + public void pop_front() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_front.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_list_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_list_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator position) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_list_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_begin()`. + */ + public mrbind_test.mr.cs.std_list_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_list_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_list_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_list_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_end()`. + */ + public mrbind_test.mr.cs.std_list_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_list_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_list_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_list_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_list_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java new file mode 100644 index 00000000..0d67303a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_list_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_const_iterator_DefaultConstruct()`. + */ + public std_list_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_const_iterator_ConstructFromAnother()`. + */ + public std_list_int_const_iterator(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_list_int_const_iterator_from_mutable()`. + */ + public std_list_int_const_iterator(mrbind_test.mr.cs.std_list_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_list_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_list_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_list_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java new file mode 100644 index 00000000..b9e02605 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_list_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_list_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_list_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_list_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_list_int_iterator_DefaultConstruct()`. + */ + public std_list_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_list_int_iterator_ConstructFromAnother()`. + */ + public std_list_int_iterator(mrbind_test.mr.cs.std_list_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_list_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_list_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_list_int_iterator other) + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_list_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_list_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_list_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..cc42abec --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,443 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..d1a60086 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,239 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..083af903 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java new file mode 100644 index 00000000..69178f18 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_DefaultConstruct()`. + */ + public std_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_ConstructFromAnother()`. + */ + public std_map_int_float(mrbind_test.mr.cs.std_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_end()`. + */ + public mrbind_test.mr.cs.std_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java new file mode 100644 index 00000000..0a6e90d5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_const_iterator_DefaultConstruct()`. + */ + public std_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_map_int_float_const_iterator(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_map_int_float_const_iterator_from_mutable()`. + */ + public std_map_int_float_const_iterator(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_map_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java new file mode 100644 index 00000000..97c19b03 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_map_int_float_iterator_DefaultConstruct()`. + */ + public std_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_map_int_float_iterator_ConstructFromAnother()`. + */ + public std_map_int_float_iterator(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_map_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..b0310ed0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,419 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..d430643b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,239 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..83fc860e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java new file mode 100644 index 00000000..a2b5971d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java @@ -0,0 +1,416 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_DefaultConstruct()`. + */ + public std_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_ConstructFromAnother()`. + */ + public std_multimap_int_float(mrbind_test.mr.cs.std_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_find()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_end()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..55d2bb5f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public std_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_from_mutable()`. + */ + public std_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multimap_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java new file mode 100644 index 00000000..6910e074 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multimap_int_float_iterator_DefaultConstruct()`. + */ + public std_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public std_multimap_int_float_iterator(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_multimap_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..fd42ebc6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..ff69a03d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java new file mode 100644 index 00000000..d80185d4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_DefaultConstruct()`. + */ + public std_multiset_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_ConstructFromAnother()`. + */ + public std_multiset_float(mrbind_test.mr.cs.std_multiset_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_float_ConstructFromRange()`. + */ + public std_multiset_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_float_count()`. + */ + public long count(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_find()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_multiset_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_end()`. + */ + public mrbind_test.mr.cs.std_multiset_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java new file mode 100644 index 00000000..8ddef650 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_float_const_iterator_DefaultConstruct()`. + */ + public std_multiset_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_float_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_float_const_iterator(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java new file mode 100644 index 00000000..ce04c86b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int_DefaultConstruct()`. + */ + public std_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int_ConstructFromAnother()`. + */ + public std_multiset_int(mrbind_test.mr.cs.std_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int other) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_multiset_int_ConstructFromRange()`. + */ + public std_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_find()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_begin()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_end()`. + */ + public mrbind_test.mr.cs.std_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java new file mode 100644 index 00000000..46df37bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_multiset_int_const_iterator_DefaultConstruct()`. + */ + public std_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public std_multiset_int_const_iterator(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_multiset_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..ce408ae2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::ExposedLayoutSh` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom()`. + */ + public std_optional_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java new file mode 100644 index 00000000..2c061c30 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::NonTrivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_NonTrivial(mrbind_test.mr.csharp.NonTrivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.NonTrivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value()`. + */ + public mrbind_test.mr.csharp.NonTrivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_NonTrivial_value_mut()`. + */ + public mrbind_test.mr.csharp.NonTrivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java new file mode 100644 index 00000000..cd6a0182 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::SA` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_ConstructFrom()`. + */ + public std_optional_MR_CSharp_SA(mrbind_test.mr.csharp.SA other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.SA other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value()`. + */ + public mrbind_test.mr.csharp.SA value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_SA_value_mut()`. + */ + public mrbind_test.mr.csharp.SA value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java new file mode 100644 index 00000000..5c53b3d8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::CSharp::Trivial` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_CSharp_Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_CSharp_Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_CSharp_Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct()`. + */ + public std_optional_MR_CSharp_Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom()`. + */ + public std_optional_MR_CSharp_Trivial(mrbind_test.mr.csharp.Trivial other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.csharp.Trivial other) + { + try + { + mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value()`. + */ + public mrbind_test.mr.csharp.Trivial value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_CSharp_Trivial_value_mut()`. + */ + public mrbind_test.mr.csharp.Trivial value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java new file mode 100644 index 00000000..2c97f2c8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::A` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_A(mrbind_test.mr.stdoptional.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.A other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value()`. + */ + public mrbind_test.mr.stdoptional.A value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_A_value_mut()`. + */ + public mrbind_test.mr.stdoptional.A value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java new file mode 100644 index 00000000..4e138404 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::B` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_B(mrbind_test.mr.stdoptional.B other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.B other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value()`. + */ + public mrbind_test.mr.stdoptional.B value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_B_value_mut()`. + */ + public mrbind_test.mr.stdoptional.B value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java new file mode 100644 index 00000000..973c94d4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `MR::StdOptional::E` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_MR_StdOptional_E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_MR_StdOptional_E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_MR_StdOptional_E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_DefaultConstruct()`. + */ + public std_optional_MR_StdOptional_E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_ConstructFrom()`. + */ + public std_optional_MR_StdOptional_E(mrbind_test.mr.stdoptional.E other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E other) + { + try + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stdoptional.E other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value()`. + */ + public mrbind_test.mr.stdoptional.E value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : mrbind_test.mr.stdoptional.E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_MR_StdOptional_E_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java new file mode 100644 index 00000000..db03cc60 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java @@ -0,0 +1,211 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `int` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_int_DefaultConstruct()`. + */ + public std_optional_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_int_ConstructFromAnother()`. + */ + public std_optional_int(mrbind_test.mr.cs.std_optional_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_int_ConstructFrom()`. + */ + public std_optional_int(int other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_int other) + { + try + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_int_AssignFrom()`. + */ + public void assignFrom(int other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int_value()`. + */ + public java.lang.Integer value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_int_value_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java new file mode 100644 index 00000000..b0a2b676 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Stores either a single `std::string` or nothing. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_optional_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_optional_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_optional_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_optional_std_string_DefaultConstruct()`. + */ + public std_optional_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_optional_std_string_ConstructFromAnother()`. + */ + public std_optional_std_string(mrbind_test.mr.cs.std_optional_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_optional_std_string_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_optional_std_string(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + this(__ctor_constructFrom(other, other_end), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFrom.invokeExact(other, other_end); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_optional_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_optional_std_string other) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_optional_std_string_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other, java.lang.foreign.MemorySegment other_end) + { + try + { + mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFrom.invokeExact(rawPointer(), other, other_end); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if this instance stores an object, as opposed to being empty. + * + * Calls `MR_C_std_optional_std_string_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value()`. + */ + public mrbind_test.mr.cs.std_string value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The stored element or null if none, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_optional_std_string_value_mut()`. + */ + public mrbind_test.mr.cs.std_string value_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_ostream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_ostream.java new file mode 100644 index 00000000..b3b4ce34 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_ostream.java @@ -0,0 +1,13 @@ +package mrbind_test.mr.cs; + +/** + * A C++ output stream. + * + * Can't be created from Java, only references to it are used. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_ostream extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_ostream(java.lang.foreign.MemorySegment ptr, java.lang.Object owner) {super(ptr, null, owner);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..67d11008 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,202 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `MR::SeparateA` and `MR::SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct()`. + */ + public std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.SeparateA first, mrbind_test.mr.SeparateB second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(second, "second")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + java.lang.ref.Reference.reachabilityFence(second); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first()`. + */ + public mrbind_test.mr.SeparateA first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut()`. + */ + public mrbind_test.mr.SeparateA first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second()`. + */ + public mrbind_test.mr.SeparateB second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut()`. + */ + public mrbind_test.mr.SeparateB second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..f9e4db36 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const MR::StdContainers::NonAssignable` and `const MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct()`. + */ + public std_pair_const_MR_StdContainers_NonAssignable_float(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.stdcontainers.NonAssignable first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(first); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java new file mode 100644 index 00000000..ab3a39b6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java @@ -0,0 +1,168 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int` and `const int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_const_int_float_DefaultConstruct()`. + */ + public std_pair_const_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_float_ConstructFromAnother()`. + */ + public std_pair_const_int_float(mrbind_test.mr.cs.std_pair_const_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * + * Calls `MR_C_std_pair_const_int_float_Construct()`. + */ + public std_pair_const_int_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java new file mode 100644 index 00000000..d7044b29 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int &` and `const int &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_ref_const_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_ref_const_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_ref_const_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother()`. + */ + public std_pair_const_int_ref_const_float_ref(mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_Construct()`. + */ + public std_pair_const_int_ref_const_float_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_ref_const_float_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java new file mode 100644 index 00000000..dd37846d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `const int &&` and `const int &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_const_int_rvalue_ref_const_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct()`. + */ + public std_pair_const_int_rvalue_ref_const_float_rvalue_ref(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java new file mode 100644 index 00000000..90dd409d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java @@ -0,0 +1,214 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int` and `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int_float_DefaultConstruct()`. + */ + public std_pair_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_float_ConstructFromAnother()`. + */ + public std_pair_int_float(mrbind_test.mr.cs.std_pair_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_float other) + { + try + { + mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * + * Calls `MR_C_std_pair_int_float_Construct()`. + */ + public std_pair_int_float(int first, float second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, float second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_second()`. + */ + public float second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_float_second_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java new file mode 100644 index 00000000..e69c1053 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java @@ -0,0 +1,96 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int &` and `int &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_ref_float_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_ref_float_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_ref_float_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_ref_float_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int_ref_float_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_ref_float_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_first.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_ref_float_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_second.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java new file mode 100644 index 00000000..400c8344 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int &&` and `int &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_rvalue_ref_float_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_rvalue_ref_float_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother()`. + */ + public std_pair_int_rvalue_ref_float_rvalue_ref(mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `first` might be preserved in the constructed object. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_pair_int_rvalue_ref_float_rvalue_ref(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment first, java.lang.foreign.MemorySegment second) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct.invokeExact(first, second); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java new file mode 100644 index 00000000..29f843a0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores two objects: `int` and `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_pair_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_pair_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_pair_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_pair_int_std_string_DefaultConstruct()`. + */ + public std_pair_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_std_string_ConstructFromAnother()`. + */ + public std_pair_int_std_string(mrbind_test.mr.cs.std_pair_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_pair_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_pair_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_std_string other) + { + try + { + mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the pair elementwise. + * The reference to the parameter `second` might be preserved in the constructed object. + * + * Calls `MR_C_std_pair_int_std_string_Construct()`. + */ + public std_pair_int_std_string(int first, java.lang.String second) + { + this(__ctor_construct(first, second), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int first, java.lang.String second) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_second = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(second, "second")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_Construct.invokeExact(first, __str_second, mrbind_test.Ffi.end(__str_second)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The first of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_first()`. + */ + public int first() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_first_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment first_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_second()`. + */ + public mrbind_test.mr.cs.std_string second() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The second of the two elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_pair_int_std_string_second_mut()`. + */ + public mrbind_test.mr.cs.std_string second_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..00ff59bc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,326 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Inserts a new element. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_insert()`. + */ + public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..765c72fd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,165 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java new file mode 100644 index 00000000..5704c190 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_DefaultConstruct()`. + */ + public std_set_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_ConstructFromAnother()`. + */ + public std_set_float(mrbind_test.mr.cs.std_set_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_float_ConstructFromRange()`. + */ + public std_set_float(java.lang.Float ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_float_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Float ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_float_contains()`. + */ + public boolean contains(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_find()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator find(float key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_set_float_insert()`. + */ + public void insert(float new_elem) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_begin()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_float_end()`. + */ + public mrbind_test.mr.cs.std_set_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java new file mode 100644 index 00000000..838ca0bc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_float_const_iterator_DefaultConstruct()`. + */ + public std_set_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_float_const_iterator_ConstructFromAnother()`. + */ + public std_set_float_const_iterator(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_float_const_iterator_deref()`. + */ + public float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java new file mode 100644 index 00000000..da81db22 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int_DefaultConstruct()`. + */ + public std_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int_ConstructFromAnother()`. + */ + public std_set_int(mrbind_test.mr.cs.std_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int other) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_set_int_ConstructFromRange()`. + */ + public std_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_find()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_begin()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_set_int_end()`. + */ + public mrbind_test.mr.cs.std_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java new file mode 100644 index 00000000..3a00e077 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_set_int_const_iterator_DefaultConstruct()`. + */ + public std_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_set_int_const_iterator_ConstructFromAnother()`. + */ + public std_set_int_const_iterator(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_set_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java new file mode 100644 index 00000000..4d678a2a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -0,0 +1,402 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::ExposedLayoutSh`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_ExposedLayoutSh::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()`. + */ + public mrbind_test.mr.csharp.ExposedLayoutSh get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructFromValue(mrbind_test.mr.csharp.ExposedLayoutSh value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh construct(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constructNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_ExposedLayoutSh(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.ExposedLayoutSh ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java new file mode 100644 index 00000000..facb8137 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java new file mode 100644 index 00000000..44e9a73c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SB(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_get()`. + */ + public mrbind_test.mr.csharp.SB get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SB_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB constructFromValue(mrbind_test.mr.csharp.SB value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB construct(mrbind_test.mr.csharp.SB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB constructNonOwning(mrbind_test.mr.csharp.SB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SB(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SB ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SB_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java new file mode 100644 index 00000000..9ae988d6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SC(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_get()`. + */ + public mrbind_test.mr.csharp.SC get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SC_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC constructFromValue(mrbind_test.mr.csharp.SC value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC construct(mrbind_test.mr.csharp.SC ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SC ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC constructNonOwning(mrbind_test.mr.csharp.SC ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SC ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SC(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SC ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SC ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SC ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SC_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java new file mode 100644 index 00000000..d62592d1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SD(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_get()`. + */ + public mrbind_test.mr.csharp.SD get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SD_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD constructFromValue(mrbind_test.mr.csharp.SD value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD construct(mrbind_test.mr.csharp.SD ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SD ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD constructNonOwning(mrbind_test.mr.csharp.SD ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SD ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SD(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SD ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SD ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SD ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SD_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java new file mode 100644 index 00000000..21ee446a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_get()`. + */ + public mrbind_test.mr.csharp.SE get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SE_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructFromValue(mrbind_test.mr.csharp.SE value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE construct(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SE(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SE ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java new file mode 100644 index 00000000..ea9b57e0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SF(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_get()`. + */ + public mrbind_test.mr.csharp.SF get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SF_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF constructFromValue(mrbind_test.mr.csharp.SF value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF construct(mrbind_test.mr.csharp.SF ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SF ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF constructNonOwning(mrbind_test.mr.csharp.SF ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SF ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SF(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SF ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SF ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SF ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SF_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java new file mode 100644 index 00000000..be0ebd72 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java @@ -0,0 +1,374 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CSharp_SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CSharp_SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CSharp_SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CSharp_SG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_get()`. + */ + public mrbind_test.mr.csharp.SG get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CSharp_SG_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG construct(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG constructNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CSharp_SG(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SG ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java new file mode 100644 index 00000000..6d7c1e54 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::CommonBaseAB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_CommonBaseAB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_CommonBaseAB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_CommonBaseAB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct()`. + */ + public std_shared_ptr_MR_CommonBaseAB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_get()`. + */ + public mrbind_test.mr.CommonBaseAB get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_CommonBaseAB_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructFromValue(mrbind_test.mr.CommonBaseAB value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB construct(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_Assign()`. + */ + public void assign(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing()`. + */ + public std_shared_ptr_MR_CommonBaseAB(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.CommonBaseAB ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java new file mode 100644 index 00000000..145147fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_DefaultConstruct()`. + */ + public std_shared_ptr_MR_SeparateA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_SeparateA(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA other) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_get()`. + */ + public mrbind_test.mr.SeparateA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_SeparateA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA constructFromValue(mrbind_test.mr.SeparateA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA construct(mrbind_test.mr.SeparateA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_Assign()`. + */ + public void assign(mrbind_test.mr.SeparateA ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA constructNonOwning(mrbind_test.mr.SeparateA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.SeparateA ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_ConstructAliasing()`. + */ + public std_shared_ptr_MR_SeparateA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateA ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateA_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java new file mode 100644 index 00000000..47060fb6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_DefaultConstruct()`. + */ + public std_shared_ptr_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_SeparateB(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_get()`. + */ + public mrbind_test.mr.SeparateB get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_SeparateB_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB constructFromValue(mrbind_test.mr.SeparateB value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB construct(mrbind_test.mr.SeparateB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_Assign()`. + */ + public void assign(mrbind_test.mr.SeparateB ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB constructNonOwning(mrbind_test.mr.SeparateB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.SeparateB ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_ConstructAliasing()`. + */ + public std_shared_ptr_MR_SeparateB(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateB ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateB ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.SeparateB ptr) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_SeparateB_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..72405dac --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..83538f25 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -0,0 +1,422 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..834ad452 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,374 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java new file mode 100644 index 00000000..347e61db --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java @@ -0,0 +1,451 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::CSharp::SA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_CSharp_SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_CSharp_SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_CSharp_SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_CSharp_SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()`. + */ + public mrbind_test.mr.csharp.SA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_CSharp_SA_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructFromValue(mrbind_test.mr.csharp.SA value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA construct(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign()`. + */ + public void assign(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_CSharp_SA(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.csharp.SA ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java new file mode 100644 index 00000000..e67a8862 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -0,0 +1,451 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructFromValue(mrbind_test.mr.stdsharedptr.A value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java new file mode 100644 index 00000000..879623bd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -0,0 +1,476 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at()`. + */ + public mrbind_test.mr.stdsharedptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java new file mode 100644 index 00000000..8cadbda3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -0,0 +1,428 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const MR::StdSharedPtr::A`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_MR_StdSharedPtr_A_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()`. + */ + public mrbind_test.mr.stdsharedptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 construct(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign()`. + */ + public void assign(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 constructNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_MR_StdSharedPtr_A_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, mrbind_test.mr.stdsharedptr.A ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java new file mode 100644 index 00000000..fcde4756 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java @@ -0,0 +1,438 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_DefaultConstruct()`. + */ + public std_shared_ptr_const_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromValue()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromValue.invokeExact(value); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_Construct()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_ConstructAliasing()`. + */ + public std_shared_ptr_const_int(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java new file mode 100644 index 00000000..38a15c9b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java @@ -0,0 +1,472 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_DefaultConstruct()`. + */ + public std_shared_ptr_const_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromSize()`. + */ + public std_shared_ptr_const_int_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_Construct()`. + */ + public std_shared_ptr_const_int_array(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_array_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int_array(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConstructAliasing()`. + */ + public std_shared_ptr_const_int_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java new file mode 100644 index 00000000..f0708e93 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java @@ -0,0 +1,425 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `const int`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_int_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_int_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_int_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_const_int_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_get()`. + */ + public java.lang.Integer get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_get.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_int_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_Construct()`. + */ + public std_shared_ptr_const_int_array_42(int ptr) + { + this(__ctor_construct(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_Assign()`. + */ + public void assign(int ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning()`. + */ + public std_shared_ptr_const_int_array_42(java.lang.Integer ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning()`. + */ + public void assignNonOwning(java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing()`. + */ + public std_shared_ptr_const_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignAliasing()`. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.Integer ptr) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr_const_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java new file mode 100644 index 00000000..b88c77cb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java @@ -0,0 +1,337 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `const void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_const_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_const_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_const_void_DefaultConstruct()`. + */ + public std_shared_ptr_const_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromAnother()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_const_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_const_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_const_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_const_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_const_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructNonOwning.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance from a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructFromMutable()`. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + this(__ctor_constructFromMutable(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Overwrite the existing instance with a non-const pointer to the same type. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignFromMutable()`. + */ + public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_const_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_const_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java new file mode 100644 index 00000000..6078534b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java @@ -0,0 +1,389 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_DefaultConstruct()`. + */ + public std_shared_ptr_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructFromAnother()`. + */ + public std_shared_ptr_int(mrbind_test.mr.cs.std_shared_ptr_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct from a value. + * + * Calls `MR_C_std_shared_ptr_int_ConstructFromValue()`. + */ + public std_shared_ptr_int(int value) + { + this(__ctor_constructFromValue(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromValue(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromValue.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java new file mode 100644 index 00000000..9a611b31 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java @@ -0,0 +1,413 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_array_DefaultConstruct()`. + */ + public std_shared_ptr_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructFromAnother()`. + */ + public std_shared_ptr_int_array(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_array_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_array_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_array_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_array_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Construct an array of the specified size. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructFromSize()`. + */ + public std_shared_ptr_int_array(long size) + { + this(__ctor_constructFromSize(size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromSize.invokeExact(size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_array_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int_array(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java new file mode 100644 index 00000000..ecf46515 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a shared reference-counted heap-allocated array of type `int`, of size 42. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_int_array_42 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_int_array_42(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_int_array_42::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_int_array_42_DefaultConstruct()`. + */ + public std_shared_ptr_int_array_42() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructFromAnother()`. + */ + public std_shared_ptr_int_array_42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array_42 other) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_int_array_42_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_int_array_42_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_int_array_42_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_int_array_42_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_int_array_42_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, taking ownership of an existing pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_42_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 construct(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Construct.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance, taking ownership of an existing pointer. The previously owned object, if any, has its reference count decremented. + * + * Calls `MR_C_std_shared_ptr_int_array_42_Assign()`. Some types are raw C types, see the C bindings for the details. + */ + public void assign(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Assign.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructNonOwning.invokeExact(ptr); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_int_array_42(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * Creates an untyped `std::shared_ptr` pointing to the same object as the source typed pointer. + * + * Calls `MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void()`. + */ + public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Overwrites an existing `std::shared_ptr` to point to the same object as this instance. + * + * Calls `MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void()`. + */ + public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void _target) + { + try + { + mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_target); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java new file mode 100644 index 00000000..834a4952 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java @@ -0,0 +1,288 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single shared reference-counted heap-allocated `void`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_shared_ptr_void extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_shared_ptr_void::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_shared_ptr_void_DefaultConstruct()`. + */ + public std_shared_ptr_void() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructFromAnother()`. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_void other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_shared_ptr_void_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if non-null. + * + * Calls `MR_C_std_shared_ptr_void_has_value()`. + */ + public boolean has_value() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_has_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * How many shared pointers share the managed object. Zero if no object is being managed. + * This being zero usually conincides with `MR_C_std_shared_ptr_void_get()` returning null, but is ultimately orthogonal. + * Note that in multithreaded environments, the only safe way to use this number is comparing it with zero. Positive values might change by the time you get to use them. + * + * Calls `MR_C_std_shared_ptr_void_use_count()`. + */ + public int use_count() + { + try + { + int __ret = (int)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_use_count.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resets the pointer to null. + * + * Calls `MR_C_std_shared_ptr_void_reset()`. + */ + public void reset() + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_reset.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Create a new instance, storing a non-owning pointer. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructNonOwning(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructNonOwning.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Overwrite the existing instance with a non-owning pointer. The previously owned object, if any, has its reference count decremented. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignNonOwning()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignNonOwning(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The aliasing constructor. Create a new instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_C_std_shared_ptr_void_ConstructAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructAliasing(ownership, ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ownership); + } + } + + /** + * The aliasing assignment. Overwrite an existing instance, copying ownership from an existing shared pointer and storing an arbitrary raw pointer. + * The input pointer can be reinterpreted from any other `std::shared_ptr` to avoid constructing a new `std::shared_ptr`. + * The reference to the parameter `ptr` might be preserved in this object. + * + * Calls `MR_C_std_shared_ptr_void_AssignAliasing()`. Some types are raw C types, see the C bindings for the details. + */ + public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership, java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ownership); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java new file mode 100644 index 00000000..2c2e1435 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java @@ -0,0 +1,276 @@ +package mrbind_test.mr.cs; + +/** + * A heap-allocated null-terminated string. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_DefaultConstruct()`. + */ + public std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_ConstructFromAnother()`. + */ + public std_string(mrbind_test.mr.cs.std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_string_ConstructFrom()`. + */ + public std_string(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string other) + { + try + { + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_string_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string, excluding the null-terminator. + * + * Calls `MR_C_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, which are always null-terminated. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string, to its null-terminator. This version returns a non-const pointer. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_data_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** The contents, decoded as UTF-8. */ + @java.lang.Override public java.lang.String toString() + { + try + { + return mrbind_test.Ffi.string((java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()), (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer())); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java new file mode 100644 index 00000000..2ff2ebcf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.cs; + +/** + * A non-owning string view. Not necessarily null-terminated. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_string_view extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_string_view(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_string_view::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_string_view_DefaultConstruct()`. + */ + public std_string_view() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFromAnother()`. + */ + public std_string_view(mrbind_test.mr.cs.std_string_view other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_string_view_ConstructFrom()`. + */ + public std_string_view(java.lang.String other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_string_view other) + { + try + { + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_string_view_AssignFrom()`. + */ + public void assignFrom(java.lang.String other) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); + mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of characters in the string. + * + * Calls `MR_C_std_string_view_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the string contents, NOT necessarily null-terminated. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the end of string. Not dereferencable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_string_view_data_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java new file mode 100644 index 00000000..7886ba47 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java @@ -0,0 +1,99 @@ +package mrbind_test.mr.cs; + +/** + * Stores 0 objects. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_DefaultConstruct()`. + */ + public std_tuple() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_ConstructFromAnother()`. + */ + public std_tuple(mrbind_test.mr.cs.std_tuple other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple other) + { + try + { + mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..8dc23517 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout`, `const MR::CSharp::ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java new file mode 100644 index 00000000..cb06928d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &`, `const MR::CSharp::ExposedLayout &`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java new file mode 100644 index 00000000..50d00719 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -0,0 +1,131 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `MR::CSharp::ExposedLayout &&`, `const MR::CSharp::ExposedLayout &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct()`. + */ + public std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.ExposedLayout _0, mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_0); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * The element 0, of type `MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const MR::CSharp::ExposedLayout &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java new file mode 100644 index 00000000..3d8c1ad6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java @@ -0,0 +1,286 @@ +package mrbind_test.mr.cs; + +/** + * Stores 10 objects: `const int`, `const float`, `int &`, `float &`, `const int &`, `const float &`, `int &&`, `float &&`, `const int &&`, `const float &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * The reference to the parameter `_4` might be preserved in the constructed object. + * The reference to the parameter `_5` might be preserved in the constructed object. + * The reference to the parameter `_6` might be preserved in the constructed object. + * The reference to the parameter `_7` might be preserved in the constructed object. + * The reference to the parameter `_8` might be preserved in the constructed object. + * The reference to the parameter `_9` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + this(__ctor_construct(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _3, int _4, float _5, java.lang.foreign.MemorySegment _6, java.lang.foreign.MemorySegment _7, int _8, float _9) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(_0, _1, _2, _3, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _4), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _5), _6, _7, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _8), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _9)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int()`. + */ + public int get_const_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float()`. + */ + public float get_const_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 4, of type `const int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref()`. + */ + public int get_const_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 5, of type `const float &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref()`. + */ + public float get_const_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 6, of type `int &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 7, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 8, of type `const int &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref()`. + */ + public int get_const_int_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 9, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java new file mode 100644 index 00000000..c3837c1e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `const int &`, `const float &&`, `const std::string &`, `const std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother()`. + */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct()`. + */ + public std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1, java.lang.String _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_2, "_2")); + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _0), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _1), __str__2, mrbind_test.Ffi.end(__str__2), __str__3, mrbind_test.Ffi.end(__str__3)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref()`. + */ + public int get_const_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `const float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref()`. + */ + public float get_const_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `const std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `const std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_const_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java new file mode 100644 index 00000000..5586fbb3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java @@ -0,0 +1,172 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `const int`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_const_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_const_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_const_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_const_int_std_string_DefaultConstruct()`. + */ + public std_tuple_const_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_std_string_ConstructFromAnother()`. + */ + public std_tuple_const_int_std_string(mrbind_test.mr.cs.std_tuple_const_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_const_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_const_int_std_string_Construct()`. + */ + public std_tuple_const_int_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `const int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_const_int()`. + */ + public int get_const_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_const_int.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_const_int_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java new file mode 100644 index 00000000..1a50ebf8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java @@ -0,0 +1,306 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `float`, `double`, `int`, `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_float_double_int_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_float_double_int_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_float_double_int_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_float_double_int_int_DefaultConstruct()`. + */ + public std_tuple_float_double_int_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_float_double_int_int_ConstructFromAnother()`. + */ + public std_tuple_float_double_int_int(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_float_double_int_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int_int other) + { + try + { + mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_float_double_int_int_Construct()`. + */ + public std_tuple_float_double_int_int(float _0, double _1, int _2, int _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(float _0, double _1, int _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_Construct.invokeExact(_0, _1, _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_double()`. + */ + public double get_double() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `double`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_double_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_double_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_2()`. + */ + public int get_int_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_3()`. + */ + public int get_int_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_float_double_int_int_get_int_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java new file mode 100644 index 00000000..3395bbc4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java @@ -0,0 +1,168 @@ +package mrbind_test.mr.cs; + +/** + * Stores 1 object: `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_DefaultConstruct()`. + */ + public std_tuple_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_ConstructFromAnother()`. + */ + public std_tuple_int(mrbind_test.mr.cs.std_tuple_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int other) + { + try + { + mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_int_Construct()`. + */ + public std_tuple_int(int _0) + { + this(__ctor_construct(_0), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_Construct.invokeExact(_0); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java new file mode 100644 index 00000000..f400d3f2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java @@ -0,0 +1,214 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_float_DefaultConstruct()`. + */ + public std_tuple_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_float_ConstructFromAnother()`. + */ + public std_tuple_int_float(mrbind_test.mr.cs.std_tuple_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_float other) + { + try + { + mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * + * Calls `MR_C_std_tuple_int_float_Construct()`. + */ + public std_tuple_int_float(int _0, float _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_Construct.invokeExact(_0, _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_float()`. + */ + public float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java new file mode 100644 index 00000000..e252ffff --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -0,0 +1,151 @@ +package mrbind_test.mr.cs; + +/** + * Stores 4 objects: `int &`, `float &&`, `std::string &`, `std::string &&`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_0` might be preserved in the constructed object. + * The reference to the parameter `_1` might be preserved in the constructed object. + * The reference to the parameter `_2` might be preserved in the constructed object. + * The reference to the parameter `_3` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + this(__ctor_construct(_0, _1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreign.MemorySegment _0, java.lang.foreign.MemorySegment _1, mrbind_test.mr.cs.std_string _2, java.lang.String _3) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct.invokeExact(_0, _1, mrbind_test.Ffi.ptrNonNull(_2, "_2"), __str__3, mrbind_test.Ffi.end(__str__3)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * The element 0, of type `int &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `float &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 2, of type `std::string &`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 3, of type `std::string &&`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java new file mode 100644 index 00000000..3e3ec09a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Stores 2 objects: `int`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_tuple_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_tuple_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_tuple_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_tuple_int_std_string_DefaultConstruct()`. + */ + public std_tuple_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_std_string_ConstructFromAnother()`. + */ + public std_tuple_int_std_string(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_tuple_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_std_string other) + { + try + { + mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs the tuple elementwise. + * The reference to the parameter `_1` might be preserved in the constructed object. + * + * Calls `MR_C_std_tuple_int_std_string_Construct()`. + */ + public std_tuple_int_std_string(int _0, java.lang.String _1) + { + this(__ctor_construct(_0, _1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The element 0, of type `int`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_int()`. + */ + public int get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 0, of type `int`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element 1, of type `std::string`, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_tuple_int_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java new file mode 100644 index 00000000..623ae858 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_Destroy()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_release.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java new file mode 100644 index 00000000..8ab46d2f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -0,0 +1,216 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `MR::StdUniquePtr::A`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_MR_StdUniquePtr_A_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_MR_StdUniquePtr_A_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_MR_StdUniquePtr_A_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom()`. + */ + public std_unique_ptr_MR_StdUniquePtr_A_array(mrbind_test.mr.stduniqueptr.A other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom()`. + */ + public void assignFrom(mrbind_test.mr.stduniqueptr.A other) + { + try + { + mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get()`. + */ + public mrbind_test.mr.stduniqueptr.A get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at()`. + */ + public mrbind_test.mr.stduniqueptr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_StdUniquePtr_A_DestroyArray()`. + * + * Calls `MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release()`. + */ + public mrbind_test.mr.stduniqueptr.A release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java new file mode 100644 index 00000000..3bb15bb6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java @@ -0,0 +1,189 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a single heap-allocated `int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int_DefaultConstruct()`. + */ + public std_unique_ptr_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int_ConstructFromAnother()`. + */ + public std_unique_ptr_int(mrbind_test.mr.cs.std_unique_ptr_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFrom.invokeExact(other); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFrom.invokeExact(rawPointer(), other); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_Free()`. + * + * Calls `MR_C_std_unique_ptr_int_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_release.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java new file mode 100644 index 00000000..75667343 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Wraps a pointer to a heap-allocated array of type `int`, of an unspecified size. + * Doesn't store the size, it has to be obtained separately. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unique_ptr_int_array extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unique_ptr_int_array(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unique_ptr_int_array::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unique_ptr_int_array_DefaultConstruct()`. + */ + public std_unique_ptr_int_array() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unique_ptr_int_array_ConstructFromAnother()`. + */ + public std_unique_ptr_int_array(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Constructs a new instance. + * + * Calls `MR_C_std_unique_ptr_int_array_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public std_unique_ptr_int_array(java.lang.foreign.MemorySegment other) + { + this(__ctor_constructFrom(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFrom.invokeExact(other); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unique_ptr_int_array_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int_array other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents. + * + * Calls `MR_C_std_unique_ptr_int_array_AssignFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public void assignFrom(java.lang.foreign.MemorySegment other) + { + try + { + mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFrom.invokeExact(rawPointer(), other); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the stored pointer, possibly null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_array_get()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_get.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns an element from the stored array. The stored pointer must not be null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unique_ptr_int_array_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Releases the pointer ownership. Returns the stored pointer and zeroes the source. If the source is already null, returns null and does nothing. + * The returned pointer is owning! It must be deallocated using `MR_C_FreeArray()`. + * + * Calls `MR_C_std_unique_ptr_int_array_release()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment release_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_release.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..7134b6b1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,443 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..908d1623 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..950a30ca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java new file mode 100644 index 00000000..d10a26e4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_DefaultConstruct()`. + */ + public std_unordered_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_ConstructFromAnother()`. + */ + public std_unordered_map_int_float(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java new file mode 100644 index 00000000..b242e1c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_from_mutable()`. + */ + public std_unordered_map_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java new file mode 100644 index 00000000..dd174895 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_DefaultConstruct()`. + */ + public std_unordered_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_map_int_float_iterator(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java new file mode 100644 index 00000000..49479696 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -0,0 +1,419 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator find_mut(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java new file mode 100644 index 00000000..39ac422a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java new file mode 100644 index 00000000..591cfc58 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java new file mode 100644 index 00000000..e9258558 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java @@ -0,0 +1,416 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_find_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_begin_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_end_mut()`. + */ + public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..f525d03d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable()`. + */ + public std_unordered_multimap_int_float_const_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java new file mode 100644 index 00000000..c2fbfc41 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_unordered_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct()`. + */ + public std_unordered_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public std_unordered_multimap_int_float_iterator(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_unordered_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..b32f158c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -0,0 +1,303 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count()`. + */ + public long count(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..b0324811 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,144 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java new file mode 100644 index 00000000..606b835a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int_DefaultConstruct()`. + */ + public std_unordered_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int_ConstructFromAnother()`. + */ + public std_unordered_multiset_int(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_multiset_int_ConstructFromRange()`. + */ + public std_unordered_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_find()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_unordered_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_end()`. + */ + public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java new file mode 100644 index 00000000..a4129c4c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct()`. + */ + public std_unordered_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_multiset_int_const_iterator(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..c7b0a441 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -0,0 +1,303 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains()`. + */ + public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator find(mrbind_test.mr.stdcontainers.NonAssignable key) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(key); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..3e69169c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,144 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java new file mode 100644 index 00000000..c80c0013 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::unordered_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int_DefaultConstruct()`. + */ + public std_unordered_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int_ConstructFromAnother()`. + */ + public std_unordered_set_int(mrbind_test.mr.cs.std_unordered_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int other) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_unordered_set_int_ConstructFromRange()`. + */ + public std_unordered_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_unordered_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_unordered_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_unordered_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_unordered_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_std_unordered_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_find()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_std_unordered_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_begin()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_unordered_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_end()`. + */ + public mrbind_test.mr.cs.std_unordered_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_unordered_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_unordered_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java new file mode 100644 index 00000000..f3050e16 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_unordered_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_unordered_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_unordered_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_unordered_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_DefaultConstruct()`. + */ + public std_unordered_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother()`. + */ + public std_unordered_set_int_const_iterator(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_unordered_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java new file mode 100644 index 00000000..1956e708 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java @@ -0,0 +1,301 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 2 objects: `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_DefaultConstruct()`. + */ + public std_variant_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_ConstructFromAnother()`. + */ + public std_variant_int_float(mrbind_test.mr.cs.std_variant_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float other) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_ConstructAs_int()`. + */ + public std_variant_int_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_int.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_ConstructAs_float()`. + */ + public std_variant_int_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_int.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java new file mode 100644 index 00000000..a5d60173 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java @@ -0,0 +1,381 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_float_DefaultConstruct()`. + */ + public std_variant_int_float_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_float_ConstructFromAnother()`. + */ + public std_variant_int_float_float(mrbind_test.mr.cs.std_variant_int_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_float other) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_int()`. + */ + public std_variant_int_float_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_int.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_float_1()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_1(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_1.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_2.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_float_1()`. + */ + public void AssignAs_float_1(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_1.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_int_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_1()`. + */ + public java.lang.Float get_float_1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_1_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_1_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java new file mode 100644 index 00000000..2f2ced6a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java @@ -0,0 +1,397 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `int`, `float`, `std::string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_int_float_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_int_float_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_int_float_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_int_float_std_string_DefaultConstruct()`. + */ + public std_variant_int_float_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructFromAnother()`. + */ + public std_variant_int_float_std_string(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_std_string other) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_int_float_std_string_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_int()`. + */ + public std_variant_int_float_std_string(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_int.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_float()`. + */ + public std_variant_int_float_std_string(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_int_float_std_string_ConstructAs_std_string()`. + */ + public std_variant_int_float_std_string(java.lang.String value) + { + this(__ctor_constructAs_std_string(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_std_string.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `int`. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_int.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `float`. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `std::string`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_int_float_std_string_AssignAs_std_string()`. + */ + public void AssignAs_std_string(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_std_string.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_std_string()`. + */ + public mrbind_test.mr.cs.std_string get_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `std::string`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_int_float_std_string_get_std_string_mut()`. + */ + public mrbind_test.mr.cs.std_string get_std_string_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java new file mode 100644 index 00000000..c99ba849 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java @@ -0,0 +1,360 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 3 objects: `std::monostate`, `int`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_DefaultConstruct.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int_float(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_int()`. + */ + public std_variant_std_monostate_int_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_int.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_ConstructAs_float()`. + */ + public std_variant_std_monostate_int_float(float value) + { + this(__ctor_constructAs_float(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_float.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_int.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_AssignAs_float()`. + */ + public void AssignAs_float(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_float.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_std_monostate.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_float()`. + */ + public java.lang.Float get_float() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_get_float_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java new file mode 100644 index 00000000..2a8ae5f6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java @@ -0,0 +1,440 @@ +package mrbind_test.mr.cs; + +/** + * Stores one of 4 objects: `std::monostate`, `int`, `float`, `float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_variant_std_monostate_int_float_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_variant_std_monostate_int_float_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_variant_std_monostate_int_float_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother()`. + */ + public std_variant_std_monostate_int_float_float(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_float_float other) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Returns the index of the stored element type. In rare cases may return -1 if this variant is "valueless by exception". + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_index()`. + */ + public long index() + { + try + { + long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_index.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Constructs the variant storing the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in the constructed object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_std_monostate() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int()`. + */ + public std_variant_std_monostate_int_float_float(int value) + { + this(__ctor_constructAs_int(value), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int.invokeExact(value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_float_2(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs the variant storing the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constructAs_float_3(float value) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3.invokeExact(value); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assigns to the variant, making it store the element 0, of type `std::monostate`. + * The reference to the parameter `value` might be preserved in this object. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate()`. + */ + public void AssignAs_std_monostate() + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 1, of type `int`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_int()`. + */ + public void AssignAs_int(int value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 2, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2()`. + */ + public void AssignAs_float_2(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Assigns to the variant, making it store the element 3, of type `float`. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3()`. + */ + public void AssignAs_float_3(float value) + { + try + { + mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 0, of type `std::monostate`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_std_monostate()`. + */ + public boolean get_std_monostate() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_std_monostate.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_int()`. + */ + public java.lang.Integer get_int() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 1, of type `int`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_int_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_int_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_2()`. + */ + public java.lang.Float get_float_2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 2, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_2_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, read-only. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_3()`. + */ + public java.lang.Float get_float_3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element 3, of type `float`, mutable. If it's not the active element, returns null. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment get_float_3_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java new file mode 100644 index 00000000..194d3e16 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java @@ -0,0 +1,825 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_DefaultConstruct()`. + */ + public std_vector_MR_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_ConstructFromAnother()`. + */ + public std_vector_MR_A(mrbind_test.mr.cs.std_vector_MR_A other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_A_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_A_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_A_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_A_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_A_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_A_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_A_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_A_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at()`. + */ + public mrbind_test.mr.A at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_at_mut()`. + */ + public mrbind_test.mr.A at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front()`. + */ + public mrbind_test.mr.A front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_front_mut()`. + */ + public mrbind_test.mr.A front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back()`. + */ + public mrbind_test.mr.A back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_back_mut()`. + */ + public mrbind_test.mr.A back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_push_back()`. + */ + public void push_back(mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_A_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert()`. + */ + public void insert(long position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_A_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position, mrbind_test.mr.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_A_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_A_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_A_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_A_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_A_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java new file mode 100644 index 00000000..35b47fb0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_from_mutable()`. + */ + public std_vector_MR_A_const_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java new file mode 100644 index 00000000..5b8e6b39 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_A_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_A_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_A_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_A_iterator_DefaultConstruct()`. + */ + public std_vector_MR_A_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_A_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_A_iterator(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_A_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_A_iterator_deref()`. + */ + public mrbind_test.mr.A deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_A_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_A_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..9ffda99c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java @@ -0,0 +1,819 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..f1c34b65 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..8178c424 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java new file mode 100644 index 00000000..0127f6eb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java @@ -0,0 +1,920 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange()`. + */ + public std_vector_MR_CSharp_ExposedLayout(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange.invokeExact(mrbind_test.Ffi.ptr(ptr), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange()`. + */ + public void assignFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut()`. + */ + public mrbind_test.mr.csharp.ExposedLayout back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position, mrbind_test.mr.csharp.ExposedLayout new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java new file mode 100644 index 00000000..44433f7c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable()`. + */ + public std_vector_MR_CSharp_ExposedLayout_const_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java new file mode 100644 index 00000000..0a46b200 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_CSharp_ExposedLayout`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_CSharp_ExposedLayout_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_CSharp_ExposedLayout_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_CSharp_ExposedLayout_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_CSharp_ExposedLayout_iterator(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref()`. + */ + public mrbind_test.mr.csharp.ExposedLayout deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java new file mode 100644 index 00000000..0b06ed08 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateA_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateA_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateA value) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateA_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateA_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateA_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateA_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at()`. + */ + public mrbind_test.mr.SeparateA at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_at_mut()`. + */ + public mrbind_test.mr.SeparateA at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front()`. + */ + public mrbind_test.mr.SeparateA front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_front_mut()`. + */ + public mrbind_test.mr.SeparateA front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back()`. + */ + public mrbind_test.mr.SeparateA back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_back_mut()`. + */ + public mrbind_test.mr.SeparateA back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateA_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position, mrbind_test.mr.SeparateA new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateA_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateA_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java new file mode 100644 index 00000000..a7bffd9f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateA_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java new file mode 100644 index 00000000..a752542f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateA_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateA_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateA_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateA_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateA_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_deref()`. + */ + public mrbind_test.mr.SeparateA deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateA_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java new file mode 100644 index 00000000..ce78acf0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateB value) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at()`. + */ + public mrbind_test.mr.SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front()`. + */ + public mrbind_test.mr.SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back()`. + */ + public mrbind_test.mr.SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position, mrbind_test.mr.SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..33ff7015 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java new file mode 100644 index 00000000..58b59520 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java new file mode 100644 index 00000000..18ec7487 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java @@ -0,0 +1,667 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java new file mode 100644 index 00000000..67b60de7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonAssignable_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java new file mode 100644 index 00000000..b29f422c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonAssignable_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonAssignable_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonAssignable_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonAssignable_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonAssignable deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java new file mode 100644 index 00000000..df40cfb2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainers.NonDefaultConstructible value) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back()`. + */ + public void push_back(mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert()`. + */ + public void insert(long position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position, mrbind_test.mr.stdcontainers.NonDefaultConstructible new_elem) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java new file mode 100644 index 00000000..8b6d8009 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java new file mode 100644 index 00000000..ac41c031 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_MR_StdContainers_NonDefaultConstructible_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_MR_StdContainers_NonDefaultConstructible_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother()`. + */ + public std_vector_MR_StdContainers_NonDefaultConstructible_iterator(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator other) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java new file mode 100644 index 00000000..80c537a1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java @@ -0,0 +1,819 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_push_back()`. + */ + public void push_back(mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert()`. + */ + public void insert(long position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position, mrbind_test.mr.csharp.A new_elem) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java new file mode 100644 index 00000000..b5728307 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable()`. + */ + public std_vector_const_MR_CSharp_A_ptr_const_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java new file mode 100644 index 00000000..5aa66f10 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_const_MR_CSharp_A_ptr`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_const_MR_CSharp_A_ptr_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_const_MR_CSharp_A_ptr_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_const_MR_CSharp_A_ptr_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother()`. + */ + public std_vector_const_MR_CSharp_A_ptr_iterator(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator other) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java new file mode 100644 index 00000000..ebc3b5aa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java @@ -0,0 +1,900 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_DefaultConstruct()`. + */ + public std_vector_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_ConstructFromAnother()`. + */ + public std_vector_int(mrbind_test.mr.cs.std_vector_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_int_ConstructFromRange()`. + */ + public std_vector_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_int_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_int_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, int value) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_int_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_int_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_int_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_at()`. + */ + public int at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_front()`. + */ + public java.lang.Integer front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_back()`. + */ + public java.lang.Integer back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * + * Calls `MR_C_std_vector_int_push_back()`. + */ + public void push_back(int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_int_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_int_insert()`. + */ + public void insert(long position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * + * Calls `MR_C_std_vector_int_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator position, int new_elem) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_begin()`. + */ + public mrbind_test.mr.cs.std_vector_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_end()`. + */ + public mrbind_test.mr.cs.std_vector_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_int_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_int_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_int_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_int_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java new file mode 100644 index 00000000..f919110b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java @@ -0,0 +1,904 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_DefaultConstruct()`. + */ + public std_vector_int64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_ConstructFromAnother()`. + */ + public std_vector_int64_t(mrbind_test.mr.cs.std_vector_int64_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_int64_t_ConstructFromRange()`. + */ + public std_vector_int64_t(java.lang.Long ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_int64_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_int64_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_int64_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_int64_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_int64_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_int64_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_int64_t_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_int64_t_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_int64_t_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_int64_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int64_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_int64_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_int64_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_begin()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int64_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_int64_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_end()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_int64_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_int64_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_int64_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_int64_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_int64_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java new file mode 100644 index 00000000..ac401e7e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_int64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_DefaultConstruct()`. + */ + public std_vector_int64_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother()`. + */ + public std_vector_int64_t_const_iterator(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_from_mutable()`. + */ + public std_vector_int64_t_const_iterator(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int64_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java new file mode 100644 index 00000000..c44aa941 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_int64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int64_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int64_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int64_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int64_t_iterator_DefaultConstruct()`. + */ + public std_vector_int64_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int64_t_iterator_ConstructFromAnother()`. + */ + public std_vector_int64_t_iterator(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int64_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int64_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_int64_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_int64_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int64_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java new file mode 100644 index 00000000..0224f070 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_const_iterator_DefaultConstruct()`. + */ + public std_vector_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_const_iterator_ConstructFromAnother()`. + */ + public std_vector_int_const_iterator(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_int_const_iterator_from_mutable()`. + */ + public std_vector_int_const_iterator(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_int_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java new file mode 100644 index 00000000..42e79cad --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_int_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_int_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_int_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_int_iterator_DefaultConstruct()`. + */ + public std_vector_int_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_int_iterator_ConstructFromAnother()`. + */ + public std_vector_int_iterator(mrbind_test.mr.cs.std_vector_int_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_int_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_int_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_iterator other) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_int_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_int_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_int_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_int_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java new file mode 100644 index 00000000..19df90e6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java @@ -0,0 +1,825 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_expected_int_std_string value) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_at()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_at_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_front()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_front_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_back()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_back_mut()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator position, mrbind_test.mr.cs.std_expected_int_std_string new_elem) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_begin()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_end()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java new file mode 100644 index 00000000..462d8cfe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_std_expected_int_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string_const_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable()`. + */ + public std_vector_std_expected_int_std_string_const_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java new file mode 100644 index 00000000..c3fd02da --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_std_expected_int_std_string`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_expected_int_std_string_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_expected_int_std_string_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_expected_int_std_string_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct()`. + */ + public std_vector_std_expected_int_std_string_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother()`. + */ + public std_vector_std_expected_int_std_string_iterator(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator other) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_expected_int_std_string deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_expected_int_std_string_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java new file mode 100644 index 00000000..db65e617 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -0,0 +1,804 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector>`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB value) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back()`. + */ + public void push_back(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert()`. + */ + public void insert(long position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_elem) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + java.lang.ref.Reference.reachabilityFence(new_elem); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator position) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java new file mode 100644 index 00000000..d2a21ee7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java @@ -0,0 +1,213 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java new file mode 100644 index 00000000..df3a64fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java @@ -0,0 +1,186 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother()`. + */ + public std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator other) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java new file mode 100644 index 00000000..2307be69 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java @@ -0,0 +1,904 @@ +package mrbind_test.mr.cs; + +/** + * Generated from C++ container `std::vector`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_DefaultConstruct()`. + */ + public std_vector_uint64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_ConstructFromAnother()`. + */ + public std_vector_uint64_t(mrbind_test.mr.cs.std_vector_uint64_t other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_std_vector_uint64_t_ConstructFromRange()`. + */ + public std_vector_uint64_t(java.lang.Long ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_std_vector_uint64_t_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Long ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_std_vector_uint64_t_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_std_vector_uint64_t_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are zeroed. + * + * Calls `MR_C_std_vector_uint64_t_resize()`. + */ + public void resize(long new_size) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize.invokeExact(rawPointer(), new_size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Resizes the container. The new elements if any are set to the specified value. + * + * Calls `MR_C_std_vector_uint64_t_resize_with_default_value()`. + */ + public void resize_with_default_value(long new_size, long value) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_std_vector_uint64_t_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The memory capacity, measued in the number of elements. + * + * Calls `MR_C_std_vector_uint64_t_capacity()`. + */ + public long capacity() + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_capacity.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Reserves memory for a certain number of elements. Never shrinks the memory. + * + * Calls `MR_C_std_vector_uint64_t_reserve()`. + */ + public void reserve(long new_capacity) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_reserve.invokeExact(rawPointer(), new_capacity); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Shrinks the capacity to match the size. + * + * Calls `MR_C_std_vector_uint64_t_shrink_to_fit()`. + */ + public void shrink_to_fit() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_shrink_to_fit.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_at()`. + */ + public long at(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at.invokeExact(rawPointer(), i); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The element at a specific index, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_at_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment at_mut(long i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_front()`. + */ + public java.lang.Long front() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The first element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_front_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment front_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_back()`. + */ + public java.lang.Long back() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The last element or null if empty, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_back_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment back_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, read-only. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_data()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to the continuous storage that holds all elements, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_data_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment data_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element at the end. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_push_back()`. + */ + public void push_back(long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_push_back.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes one element from the end. + * + * Calls `MR_C_std_vector_uint64_t_pop_back()`. + */ + public void pop_back() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_pop_back.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert()`. + */ + public void insert(long position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert.invokeExact(rawPointer(), position, new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_uint64_t_erase()`. + */ + public void erase(long position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase.invokeExact(rawPointer(), position); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element right before the specified position. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert_at_mutable_iter()`. + */ + public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. + * + * Calls `MR_C_std_vector_uint64_t_erase_at_mutable_iter()`. + */ + public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Inserts a new element right before the specified position. This version takes the position in form of a const iterator, that's the only difference. + * The reference to the parameter `new_elem` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_insert_at_iter()`. + */ + public void insert_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator position, long new_elem) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * Erases the element at the specified position. This version takes the position in form of a const iterator, that's the only difference. + * + * Calls `MR_C_std_vector_uint64_t_erase_at_iter()`. + */ + public void erase_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator position) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(position); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_begin()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_begin()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_begin_mut()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_end()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_end()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_end_mut()`. + */ + public mrbind_test.mr.cs.std_vector_uint64_t_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end_mut.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_std_vector_uint64_t_is_end_mut()`. + */ + public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a const iterator to an index. + * + * Calls `MR_C_std_vector_uint64_t_to_index()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Convert a mutable iterator to an index. + * + * Calls `MR_C_std_vector_uint64_t_to_index_mut()`. + */ + public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java new file mode 100644 index 00000000..661defbf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.cs; + +/** + * Read-only iterator for `MR_C_std_vector_uint64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct()`. + */ + public std_vector_uint64_t_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother()`. + */ + public std_vector_uint64_t_const_iterator(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_from_mutable()`. + */ + public std_vector_uint64_t_const_iterator(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_deref()`. + */ + public long deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a const iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_uint64_t_const_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java new file mode 100644 index 00000000..73cd8bc8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -0,0 +1,185 @@ +package mrbind_test.mr.cs; + +/** + * Mutable iterator for `MR_C_std_vector_uint64_t`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class std_vector_uint64_t_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public std_vector_uint64_t_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? std_vector_uint64_t_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_std_vector_uint64_t_iterator_DefaultConstruct()`. + */ + public std_vector_uint64_t_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_std_vector_uint64_t_iterator_ConstructFromAnother()`. + */ + public std_vector_uint64_t_iterator(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_std_vector_uint64_t_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator other) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_std_vector_uint64_t_iterator_deref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_deref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_std_vector_uint64_t_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_std_vector_uint64_t_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments or decrements a mutable iterator by the specific amount. Completes in constant time. + * + * Calls `MR_C_std_vector_uint64_t_iterator_add_assign()`. + */ + public void add_assign(long delta) + { + try + { + mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java new file mode 100644 index 00000000..727cbe82 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::A`. + * Derived classes: + * Virtual: + * `MR::CSharp::C` + * Direct: (non-virtual) + * `MR::CSharp::B` + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.csharp.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.A assignFromAnother(mrbind_test.mr.csharp.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::A::foo`. + * + * Calls `MR_CSharp_A_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::bar`. + * + * Calls `MR_CSharp_A_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::static_foo`. + * + * Calls `MR_CSharp_A_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::static_bar`. + * + * Calls `MR_CSharp_A_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_foo`. + * + * Calls `MR_CSharp_A_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::virtual_bar`. + * + * Calls `MR_CSharp_A_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::A::refs`. + * + * Calls `MR_CSharp_A_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java new file mode 100644 index 00000000..6cc71c0a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java @@ -0,0 +1,250 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::AmbiguousTemplates`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class AmbiguousTemplates extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public AmbiguousTemplates(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? AmbiguousTemplates::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_AmbiguousTemplates_DefaultConstruct()`. + */ + public AmbiguousTemplates() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::AmbiguousTemplates::AmbiguousTemplates`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_AmbiguousTemplates_ConstructFromAnother()`. + */ + public AmbiguousTemplates(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_AmbiguousTemplates_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.AmbiguousTemplates assignFromAnother(mrbind_test.mr.csharp.AmbiguousTemplates _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.AmbiguousTemplates(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_int()`. + */ + public void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_int.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_a`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_a_float()`. + */ + public void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_float.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_int()`. + */ + public int template_b_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_b`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_b_float()`. + */ + public float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_float.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_int()`. + */ + public void template_c_int() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_int.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::template_c`. + * + * Calls `MR_CSharp_AmbiguousTemplates_template_c_float()`. + */ + public void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_float.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::AmbiguousTemplates::instantiate`. + * + * Calls `MR_CSharp_AmbiguousTemplates_instantiate()`. + */ + public void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_instantiate.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java new file mode 100644 index 00000000..3c878082 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -0,0 +1,464 @@ +package mrbind_test.mr.csharp; + +/** + * Test various array members. + * Generated from class `MR::CSharp::ArrayMembers`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ArrayMembers extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ArrayMembers(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ArrayMembers::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ArrayMembers_DefaultConstruct()`. + */ + public ArrayMembers() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ArrayMembers::ArrayMembers`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ArrayMembers_ConstructFromAnother()`. + */ + public ArrayMembers(mrbind_test.mr.csharp.ArrayMembers _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ArrayMembers _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `i`. + * + * Calls `MR_CSharp_ArrayMembers_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ia()`. + */ + public int ia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ia()`. + */ + public static long iaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `iaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_iaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment iaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `iaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_iaa()`. + */ + public static long iaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ci`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ci()`. + */ + public int ci() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cia`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cia()`. + */ + public int cia() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `cia`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_cia()`. + */ + public static long ciaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `ciaa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_ciaa()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ciaa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `ciaa`. The size is `3`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_ciaa()`. + */ + public static long ciaaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ArrayMembers` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_ArrayMembers_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `sa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_sa()`. + */ + public mrbind_test.mr.cs.std_string sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `sa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_sa()`. + */ + public static long saSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * std::string saa[3][4]; // The C generator doesn't support those yet. We'd need to expose them as flat arrays, with N size getters, I think? + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `cs`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_cs()`. + */ + public mrbind_test.mr.cs.std_string cs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ArrayMembers` named `csa`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ArrayMembers_Get_csa()`. + */ + public mrbind_test.mr.cs.std_string csa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::ArrayMembers` named `csa`. The size is `2`. + * + * Calls `MR_CSharp_ArrayMembers_GetSize_csa()`. + */ + public static long csaSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java new file mode 100644 index 00000000..f5bbc254 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java @@ -0,0 +1,267 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.csharp.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::B::B`. + * + * Calls `MR_CSharp_B_Construct()`. + */ + public B(int a, int b) + { + this(__ctor_construct(a, b), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int a, int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Construct.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_B_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::B::foo`. + * + * Calls `MR_CSharp_B_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::bar`. + * + * Calls `MR_CSharp_B_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::static_foo`. + * + * Calls `MR_CSharp_B_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::static_bar`. + * + * Calls `MR_CSharp_B_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::B::virtual_foo`. + * + * Calls `MR_CSharp_B_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::virtual_bar`. + * + * Calls `MR_CSharp_B_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::B::refs`. + * + * Calls `MR_CSharp_B_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java new file mode 100644 index 00000000..f7920557 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java @@ -0,0 +1,244 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::C`. + * Base classes: + * Virtual: + * `MR::CSharp::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.csharp.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_C_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::C::foo`. + * + * Calls `MR_CSharp_C_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::bar`. + * + * Calls `MR_CSharp_C_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::static_foo`. + * + * Calls `MR_CSharp_C_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::C::static_bar`. + * + * Calls `MR_CSharp_C_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::C::virtual_foo`. + * + * Calls `MR_CSharp_C_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::virtual_bar`. + * + * Calls `MR_CSharp_C_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::C::refs`. + * + * Calls `MR_CSharp_C_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java new file mode 100644 index 00000000..47b3b3b3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Test the call operator, since it can have an unusual amount of arguments. + * Not testing `[]` here to be able to run the tests on older C++. + * Generated from class `MR::CSharp::CallOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class CallOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public CallOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? CallOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_CallOp_DefaultConstruct()`. + */ + public CallOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::CallOp::CallOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_CallOp_ConstructFromAnother()`. + */ + public CallOp(mrbind_test.mr.csharp.CallOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_CallOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.CallOp assignFromAnother(mrbind_test.mr.csharp.CallOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.CallOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_0()`. + */ + public void call_0() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_0.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::CallOp::operator()`. + * + * Calls `MR_CSharp_CallOp_call_3()`. + */ + public int call_3(int _1, int _2, int _3) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_3.invokeExact(rawPointer(), _1, _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java new file mode 100644 index 00000000..5d0ed26a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -0,0 +1,324 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersBool`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersBool extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersBool::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersBool::ClassMemberPointersBool`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFromAnother()`. + */ + public ClassMemberPointersBool(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersBool _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersBool` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersBool_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersBool(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Boolean b, java.lang.foreign.MemorySegment c, boolean d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_sb()`. + */ + public static void setSb(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_sd()`. + */ + public static boolean sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersBool` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Set_b()`. + */ + public void setB(java.lang.Boolean value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersBool` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersBool_Get_d()`. + */ + public boolean d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java new file mode 100644 index 00000000..3908e24d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -0,0 +1,346 @@ +package mrbind_test.mr.csharp; + +/** + * Class fields of pointer types: + * Generated from class `MR::CSharp::ClassMemberPointersClass`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersClass extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersClass(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersClass::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersClass::ClassMemberPointersClass`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFromAnother()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersClass _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersClass` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersClass_ConstructFrom()`. + */ + public ClassMemberPointersClass(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.A a, mrbind_test.mr.csharp.A b, mrbind_test.mr.csharp.A c, mrbind_test.mr.csharp.A d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sc()`. + */ + public static mrbind_test.mr.csharp.A sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_sd()`. + */ + public static mrbind_test.mr.csharp.A sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersClass` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_c()`. + */ + public mrbind_test.mr.csharp.A c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersClass` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersClass_Get_d()`. + */ + public mrbind_test.mr.csharp.A d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java new file mode 100644 index 00000000..ab22a094 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -0,0 +1,345 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersExposed`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersExposed extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersExposed(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersExposed::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersExposed::ClassMemberPointersExposed`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersExposed _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersExposed` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_ConstructFrom()`. + */ + public ClassMemberPointersExposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, mrbind_test.mr.csharp.ExposedLayout c, mrbind_test.mr.csharp.ExposedLayout d) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + java.lang.ref.Reference.reachabilityFence(d); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sa()`. + */ + public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_sb()`. + */ + public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sc()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_sd()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Set_b()`. + */ + public void setB(mrbind_test.mr.csharp.ExposedLayout value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_c()`. + */ + public mrbind_test.mr.csharp.ExposedLayout c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersExposed` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersExposed_Get_d()`. + */ + public mrbind_test.mr.csharp.ExposedLayout d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java new file mode 100644 index 00000000..371acc5f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -0,0 +1,324 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ClassMemberPointersUshort`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassMemberPointersUshort extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassMemberPointersUshort::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ClassMemberPointersUshort::ClassMemberPointersUshort`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother()`. + */ + public ClassMemberPointersUshort(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ClassMemberPointersUshort _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::ClassMemberPointersUshort` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `c` might be preserved in the constructed object. + * The reference to the parameter `d` might be preserved in the constructed object. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public ClassMemberPointersUshort(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + this(__ctor_constructFrom(a, b, c, d), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment a, java.lang.Short b, java.lang.foreign.MemorySegment c, short d) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, d)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sa() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sa`. + * The reference to the parameter `value` might be preserved in this object in element `sa`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sa()`. Some types are raw C types, see the C bindings for the details. + */ + public static void setSa(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sb()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sb() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sb`. + * The reference to the parameter `value` might be preserved in this object in element `sb`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_sb()`. + */ + public static void setSb(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sc`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sc()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment sc() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `sd`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_sd()`. + */ + public static short sd() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_a()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_a()`. Some types are raw C types, see the C bindings for the details. + */ + public void setA(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_b()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Set_b()`. + */ + public void setB(java.lang.Short value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `c`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_c()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::ClassMemberPointersUshort` named `d`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_ClassMemberPointersUshort_Get_d()`. + */ + public short d() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java new file mode 100644 index 00000000..468d8438 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java @@ -0,0 +1,246 @@ +package mrbind_test.mr.csharp; + +/** + * Test that we don't produce the const and non-const overloads of the same function under the same name in C#, as that would be a compilation error in C#. + * Generated from class `MR::CSharp::ConstNonconstConflicts`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConstNonconstConflicts extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConstNonconstConflicts");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConstNonconstConflicts(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConstNonconstConflicts copy() {return new ConstNonconstConflicts(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConstNonconstConflicts other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_int()`. + */ + public void foo(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_int.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_float()`. + */ + public void foo(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_float.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_mut_char()`. + */ + public void foo_mut_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_char.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::foo`. + * + * Calls `MR_CSharp_ConstNonconstConflicts_foo_char()`. + */ + public void foo_char(byte _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_char.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator+`. + * + * Calls `MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public int opPos_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator~`. + * + * Calls `MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public void opCompl_const_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int()`. + */ + public int opDiv_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConstNonconstConflicts::operator/`. + * + * Calls `MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int()`. + */ + public int opDiv_const_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ConstNonconstConflicts() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java new file mode 100644 index 00000000..acd2a1fd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java @@ -0,0 +1,218 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion constructors. Right now we only provide conversion operators for implicit ones, + * because I have no idea when the explicit ones could be useful. + * Generated from class `MR::CSharp::ConvCtor`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtor extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtor(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtor::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtor_DefaultConstruct()`. + */ + public ConvCtor() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtor_ConstructFromAnother()`. + */ + public ConvCtor(mrbind_test.mr.csharp.ConvCtor _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_int()`. + */ + public ConvCtor(int _1) + { + this(__ctor_construct_1_int(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_int.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_int()`. + */ + public ConvCtor(int _1, int _2) + { + this(__ctor_construct_2_int(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_int(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int.invokeExact(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_short()`. + */ + public ConvCtor(short _1, java.lang.Integer _2) + { + this(__ctor_construct_2_short(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_short(short _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_short.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_1_float()`. + */ + public ConvCtor(float _1) + { + this(__ctor_construct_1_float(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_float(float _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_float.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtor::ConvCtor`. + * + * Calls `MR_CSharp_ConvCtor_Construct_2_float()`. + */ + public ConvCtor(float _1, float _2) + { + this(__ctor_construct_2_float(_1, _2), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2_float(float _1, float _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_float.invokeExact(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtor::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtor_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtor assignFromAnother(mrbind_test.mr.csharp.ConvCtor _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtor(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java new file mode 100644 index 00000000..b65cebe5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * A sad class that's copyable but not movable. + * This can often happen if you have a user-provided destructor. + * Generated from class `MR::CSharp::ConvCtorCopyButNoMove`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorCopyButNoMove extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorCopyButNoMove(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorCopyButNoMove::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother()`. + */ + public ConvCtorCopyButNoMove(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorCopyButNoMove::ConvCtorCopyButNoMove`. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_Construct()`. + */ + public ConvCtorCopyButNoMove(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorCopyButNoMove::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorCopyButNoMove assignFromAnother(mrbind_test.mr.csharp.ConvCtorCopyButNoMove _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorCopyButNoMove(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java new file mode 100644 index 00000000..c7ccbd7e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java @@ -0,0 +1,54 @@ +package mrbind_test.mr.csharp; + +/** + * A converting ctor in an exposed struct. + * Generated from class `MR::CSharp::ConvCtorExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ConvCtorExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ConvCtorExposed copy() {return new ConvCtorExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ConvCtorExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Generated from constructor `MR::CSharp::ConvCtorExposed::ConvCtorExposed`. + * + * Calls `MR_CSharp_ConvCtorExposed_Construct()`. + */ + public ConvCtorExposed(int _1) + { + super(__ctor_construct(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorExposed_Construct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public ConvCtorExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java new file mode 100644 index 00000000..692b6556 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a non-trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorNonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_DefaultConstruct()`. + */ + public ConvCtorNonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother()`. + */ + public ConvCtorNonTrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivial::ConvCtorNonTrivial`. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_Construct()`. + */ + public ConvCtorNonTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorNonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java new file mode 100644 index 00000000..ef295dcd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * A non-trivial move-only class with a converting ctor. + * Here we test that our converting constructors injected into `_ByValue_...` don't attempt to copy the class. + * Generated from class `MR::CSharp::ConvCtorNonTrivialRestricted`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorNonTrivialRestricted extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorNonTrivialRestricted(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorNonTrivialRestricted::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother()`. + */ + public ConvCtorNonTrivialRestricted(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorNonTrivialRestricted::ConvCtorNonTrivialRestricted`. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_Construct()`. + */ + public ConvCtorNonTrivialRestricted(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorNonTrivialRestricted::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted assignFromAnother(mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java new file mode 100644 index 00000000..d3800440 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Test how a trivial class with a converting constructor gets the additional conversion operators in its parameter passing helpers. + * Generated from class `MR::CSharp::ConvCtorTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvCtorTrivial_DefaultConstruct()`. + */ + public ConvCtorTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorTrivial_ConstructFromAnother()`. + */ + public ConvCtorTrivial(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorTrivial::ConvCtorTrivial`. + * + * Calls `MR_CSharp_ConvCtorTrivial_Construct()`. + */ + public ConvCtorTrivial(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorTrivial assignFromAnother(mrbind_test.mr.csharp.ConvCtorTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java new file mode 100644 index 00000000..08c38364 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Test that the default argument of the parameter of a converting constructor is stripped when rewriting it as a conversion operator. + * Generated from class `MR::CSharp::ConvCtorWithDefArg`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvCtorWithDefArg extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvCtorWithDefArg(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvCtorWithDefArg::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_Construct()`. + */ + public ConvCtorWithDefArg(java.lang.Integer _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Construct.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvCtorWithDefArg::ConvCtorWithDefArg`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother()`. + */ + public ConvCtorWithDefArg(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::ConvCtorWithDefArg::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvCtorWithDefArg_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvCtorWithDefArg assignFromAnother(mrbind_test.mr.csharp.ConvCtorWithDefArg _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvCtorWithDefArg(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java new file mode 100644 index 00000000..791c9ebb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators. We preserve explicit-ness. + * Generated from class `MR::CSharp::ConvOp`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOp extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOp(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOp::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOp_DefaultConstruct()`. + */ + public ConvOp() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOp::ConvOp`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOp_ConstructFromAnother()`. + */ + public ConvOp(mrbind_test.mr.csharp.ConvOp _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator int`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from conversion operator `MR::CSharp::ConvOp::operator float`. + * + * Calls `MR_CSharp_ConvOp_ConvertTo_float()`. + */ + public float convertTo_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_float.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOp::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOp_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOp assignFromAnother(mrbind_test.mr.csharp.ConvOp _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOp(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java new file mode 100644 index 00000000..42916991 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java @@ -0,0 +1,171 @@ +package mrbind_test.mr.csharp; + +/** + * Conversion operators to references. + * Generated from class `MR::CSharp::ConvOpToRef`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ConvOpToRef extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ConvOpToRef(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ConvOpToRef::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_ConvOpToRef_DefaultConstruct()`. + */ + public ConvOpToRef() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::ConvOpToRef::ConvOpToRef`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_ConvOpToRef_ConstructFromAnother()`. + */ + public ConvOpToRef(mrbind_test.mr.csharp.ConvOpToRef _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not to a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator int`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator float &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_float_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_float_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_float_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * To a reference, explicit. + * Generated from conversion operator `MR::CSharp::ConvOpToRef::operator unsigned short &`. + * + * Calls `MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment convertTo_unsigned_short_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ConvOpToRef::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_ConvOpToRef_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.ConvOpToRef assignFromAnother(mrbind_test.mr.csharp.ConvOpToRef _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ConvOpToRef(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java new file mode 100644 index 00000000..ac0228af --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java @@ -0,0 +1,147 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::D`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::F` + * `MR::CSharp::G` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.csharp.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_D_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.D assignFromAnother(mrbind_test.mr.csharp.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::D::d1`. + * + * Calls `MR_CSharp_D_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::D::d2`. + * + * Calls `MR_CSharp_D_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java new file mode 100644 index 00000000..e39d8ef6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::E`. + * Derived classes: + * Virtual: + * `MR::CSharp::G` + * Direct: (non-virtual) + * `MR::CSharp::F` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class E extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public E(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? E::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_E_DefaultConstruct()`. + */ + public E() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::E::E`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_E_ConstructFromAnother()`. + */ + public E(mrbind_test.mr.csharp.E _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_E_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.E assignFromAnother(mrbind_test.mr.csharp.E _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.E(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::E::e1`. + * + * Calls `MR_CSharp_E_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::E::e2`. + * + * Calls `MR_CSharp_E_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E1.java new file mode 100644 index 00000000..a25ccc05 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E1.java @@ -0,0 +1,45 @@ +package mrbind_test.mr.csharp; + +/** + * Enum comment. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E1 +{ + public final int value; + + public E1(int value) {this.value = value;} + + /** + * A + */ + public static final E1 a = new E1(10); + /** + * B + */ + public static final E1 b = new E1(20); + /** + * C + */ + public static final E1 c = new E1(30); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E1 of(int value) + { + if (value == a.value) return a; + if (value == b.value) return b; + if (value == c.value) return c; + return new E1(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E1 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + if (value == c.value) return "c"; + return "E1(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E2.java new file mode 100644 index 00000000..06d50b54 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E2.java @@ -0,0 +1,34 @@ +package mrbind_test.mr.csharp; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final boolean value; + + public E2(boolean value) {this.value = value;} + + /** + * < Test a same-line documentation comment. Add some >weird< & 'characters". + */ + public static final E2 a = new E2(false); + public static final E2 b = new E2(true); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(boolean value) + { + if (value == a.value) return a; + if (value == b.value) return b; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return value ? 1 : 0;} + @java.lang.Override public java.lang.String toString() + { + if (value == a.value) return "a"; + if (value == b.value) return "b"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java new file mode 100644 index 00000000..008d3bfa --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.csharp; + +/** + * Test equality comparison. + * Generated from class `MR::CSharp::EqualityA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityA_DefaultConstruct()`. + */ + public EqualityA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityA::EqualityA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityA_ConstructFromAnother()`. + */ + public EqualityA(mrbind_test.mr.csharp.EqualityA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityA assignFromAnother(mrbind_test.mr.csharp.EqualityA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA_int()`. + */ + public boolean opEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityA_int()`. + */ + public boolean opNotEqual(int _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityA::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityA()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java new file mode 100644 index 00000000..1fc6bb3f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java @@ -0,0 +1,169 @@ +package mrbind_test.mr.csharp; + +/** + * Return type isn't `bool`. + * Generated from class `MR::CSharp::EqualityB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityB_DefaultConstruct()`. + */ + public EqualityB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityB::EqualityB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityB_ConstructFromAnother()`. + */ + public EqualityB(mrbind_test.mr.csharp.EqualityB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityB assignFromAnother(mrbind_test.mr.csharp.EqualityB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB_int()`. + */ + public int opEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityB_int()`. + */ + public int opNotEqual(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityB::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityB()`. + */ + public int opEqual(mrbind_test.mr.csharp.EqualityB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java new file mode 100644 index 00000000..3e001487 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java @@ -0,0 +1,166 @@ +package mrbind_test.mr.csharp; + +/** + * Return type is `void`. + * Generated from class `MR::CSharp::EqualityC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityC_DefaultConstruct()`. + */ + public EqualityC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityC::EqualityC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityC_ConstructFromAnother()`. + */ + public EqualityC(mrbind_test.mr.csharp.EqualityC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityC assignFromAnother(mrbind_test.mr.csharp.EqualityC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC_int()`. + */ + public void opEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator!=`. + * + * Calls `MR_C_not_equal_MR_CSharp_EqualityC_int()`. + */ + public void opNotEqual(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::EqualityC::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityC()`. + */ + public void opEqual(mrbind_test.mr.csharp.EqualityC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java new file mode 100644 index 00000000..ba308694 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and isn't a managed type. + * Generated from class `MR::CSharp::EqualityD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityD_DefaultConstruct()`. + */ + public EqualityD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityD::EqualityD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityD_ConstructFromAnother()`. + */ + public EqualityD(mrbind_test.mr.csharp.EqualityD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityD assignFromAnother(mrbind_test.mr.csharp.EqualityD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityD::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityD_const_int_ptr()`. + */ + public boolean opEqual(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityD_const_int_ptr.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java new file mode 100644 index 00000000..71c9a91a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * The C# parameter type ends with `?`, and is a managed type. + * Generated from class `MR::CSharp::EqualityE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class EqualityE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public EqualityE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? EqualityE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_EqualityE_DefaultConstruct()`. + */ + public EqualityE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::EqualityE::EqualityE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_EqualityE_ConstructFromAnother()`. + */ + public EqualityE(mrbind_test.mr.csharp.EqualityE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_EqualityE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.EqualityE assignFromAnother(mrbind_test.mr.csharp.EqualityE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.EqualityE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::EqualityE::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.EqualityD _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(_1)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java new file mode 100644 index 00000000..e0e7f587 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java @@ -0,0 +1,272 @@ +package mrbind_test.mr.csharp; + +/** + * Exposed structs: + * Generated from class `MR::CSharp::ExposedLayout`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayout extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayout");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayout(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayout copy() {return new ExposedLayout(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayout other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayout::foo`. + * + * Calls `MR_CSharp_ExposedLayout_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::bar`. + * + * Calls `MR_CSharp_ExposedLayout_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::blah`. + * + * Calls `MR_CSharp_ExposedLayout_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayout::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayout()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayout_ref_int()`. + */ + public int opAdd_ref_int(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Test how returning references to an exposed struct works, since C# overloaded operators can't return `ref`. + * Note that this operator must be `const` to test this correctly, since we turn non-const operators in exposed structs into functions. + * Generated from method `MR::CSharp::ExposedLayout::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayout_int()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opMul(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayout_int.invokeExact(rawPointer(), _1); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator+`. + * + * Calls `MR_C_add_const_MR_CSharp_ExposedLayout_ref_int()`. + */ + public mrbind_test.mr.csharp.ExposedLayout opAdd_const_ref_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_const_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayout_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayout_float.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayout::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayout_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout_char.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public ExposedLayout() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java new file mode 100644 index 00000000..9ff0610e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -0,0 +1,82 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::ExposedLayoutB`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutB extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutB");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutB(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutB copy() {return new ExposedLayoutB(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutB other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** + * Some random ctor. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_2()`. + */ + public ExposedLayoutB(int _1, int _2) + { + super(__ctor_construct_2(_1, _2), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(int _1, int _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_2.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This gets a lifetime annotation from `--infer-lifetime-constructors`, but it should be a no-op in an exposed struct. + * Generated from constructor `MR::CSharp::ExposedLayoutB::ExposedLayoutB`. + * + * Calls `MR_CSharp_ExposedLayoutB_Construct_1()`. + */ + public ExposedLayoutB(mrbind_test.mr.csharp.A _1) + { + super(__ctor_construct_1(_1), null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr.csharp.A _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutB() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutC.java new file mode 100644 index 00000000..6f97ef2f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutC.java @@ -0,0 +1,31 @@ +package mrbind_test.mr.csharp; + +/** + * Just a simple exposed struct to test other things. + * Generated from class `MR::CSharp::ExposedLayoutC`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutC extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::ExposedLayoutC");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutC(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutC copy() {return new ExposedLayoutC(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutC other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public ExposedLayoutC() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java new file mode 100644 index 00000000..2e777134 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -0,0 +1,294 @@ +package mrbind_test.mr.csharp; + +/** + * This one is backed by a shared pointer. + * Generated from class `MR::CSharp::ExposedLayoutSh`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ExposedLayoutSh extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "y", "z", "arr", "b", "ba"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_DOUBLE, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_BOOLEAN))}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + public static final long OFF_z = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("z")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_ba = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ba")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 56, 8, "MR::CSharp::ExposedLayoutSh");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ExposedLayoutSh(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public ExposedLayoutSh copy() {return new ExposedLayoutSh(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(ExposedLayoutSh other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + /** + * This is field `y`! + */ + public int y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y);} + public void setY(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_y, value);} + + public double z() {return segment.get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z);} + public void setZ(double value) {segment.set(java.lang.foreign.ValueLayout.JAVA_DOUBLE, OFF_z, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public boolean b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b);} + public void setB(boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_b, value);} + + public boolean ba(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1);} + public void setBa(int i0, int i1, boolean value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, OFF_ba + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 1, value);} + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::foo`. + * + * Calls `MR_CSharp_ExposedLayoutSh_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::bar`. + * + * Calls `MR_CSharp_ExposedLayoutSh_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::blah`. + * + * Calls `MR_CSharp_ExposedLayoutSh_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try some jank operators. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_ExposedLayoutSh()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator+`. + * + * Calls `MR_C_add_MR_CSharp_ExposedLayoutSh_int()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_add_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_ExposedLayoutSh_int()`. + */ + public int opMul(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_mul_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opLess(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_float()`. + */ + public boolean opEqual(float _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_float.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::ExposedLayoutSh::operator<`. + * + * Calls `MR_C_less_MR_CSharp_ExposedLayoutSh_char()`. + */ + public boolean opLess(byte _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh_char.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * While we're at it, test comparison against another exposed struct, since this is apparently non-trivial. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And against itself, too. + * Generated from method `MR::CSharp::ExposedLayoutSh::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutSh()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** Zero-initialized. */ + public ExposedLayoutSh() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java new file mode 100644 index 00000000..6a7ac6ab --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java @@ -0,0 +1,330 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::F`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * `MR::CSharp::E` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class F extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public F(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? F::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_F_DefaultConstruct()`. + */ + public F() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::F::F`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_F_ConstructFromAnother()`. + */ + public F(mrbind_test.mr.csharp.F _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::F::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_F_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.F(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::F::foo`. + * + * Calls `MR_CSharp_F_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::bar`. + * + * Calls `MR_CSharp_F_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::static_foo`. + * + * Calls `MR_CSharp_F_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::F::static_bar`. + * + * Calls `MR_CSharp_F_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::F::virtual_foo`. + * + * Calls `MR_CSharp_F_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::virtual_bar`. + * + * Calls `MR_CSharp_F_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::refs`. + * + * Calls `MR_CSharp_F_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::d1`. + * + * Calls `MR_CSharp_F_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::d2`. + * + * Calls `MR_CSharp_F_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::e1`. + * + * Calls `MR_CSharp_F_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::F::e2`. + * + * Calls `MR_CSharp_F_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java new file mode 100644 index 00000000..17d38978 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java @@ -0,0 +1,7085 @@ +package mrbind_test.mr.csharp; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CSharp::foo`. + * + * Calls `MR_CSharp_foo()`. + */ + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int`. + * + * Calls `MR_CSharp_test_int()`. + */ + public static int test_int(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Marking this `noexcept` for testing. + * Generated from function `MR::CSharp::test_bool`. + * + * Calls `MR_CSharp_test_bool()`. + */ + public static boolean test_bool(boolean a, java.lang.Boolean b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref`. + * + * Calls `MR_CSharp_test_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void test_bool_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref.invokeExact(a, b); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_ref2`. + * + * Calls `MR_CSharp_test_bool_ref2()`. Some types are raw C types, see the C bindings for the details. + */ + public static int test_bool_ref2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_bool_ref`. + * + * Calls `MR_CSharp_get_bool_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment get_bool_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_get_bool_ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::print_bool_ref`. + * + * Calls `MR_CSharp_print_bool_ref()`. + */ + public static void print_bool_ref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_print_bool_ref.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_bool_cref`. + * + * Calls `MR_CSharp_test_bool_cref()`. + */ + public static boolean test_bool_cref(boolean _1, java.lang.Boolean _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _1), (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _2))); + return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ref`. + * + * Calls `MR_CSharp_test_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cref`. + * + * Calls `MR_CSharp_test_int_cref()`. + */ + public static int test_int_cref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_rref`. + * + * Calls `MR_CSharp_test_int_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_crref`. + * + * Calls `MR_CSharp_test_int_crref()`. + */ + public static int test_int_crref(int a, java.lang.Integer b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_ptr`. + * + * Calls `MR_CSharp_test_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_int_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_int_cptr`. + * + * Calls `MR_CSharp_test_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Integer test_int_cptr(java.lang.Integer a, java.lang.Integer b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b)), c); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort`. + * + * Calls `MR_CSharp_test_ushort()`. + */ + public static short test_ushort(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + short __ret = (short)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ref`. + * + * Calls `MR_CSharp_test_ushort_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cref`. + * + * Calls `MR_CSharp_test_ushort_cref()`. + */ + public static short test_ushort_cref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_rref`. + * + * Calls `MR_CSharp_test_ushort_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_crref`. + * + * Calls `MR_CSharp_test_ushort_crref()`. + */ + public static short test_ushort_crref(short a, java.lang.Short b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_ptr`. + * + * Calls `MR_CSharp_test_ushort_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ushort_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ushort_cptr`. + * + * Calls `MR_CSharp_test_ushort_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.Short test_ushort_cptr(java.lang.Short a, java.lang.Short b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c); + return __ret.address() == 0 ? null : (java.lang.Short)__ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_int`. + * + * Calls `MR_CSharp_test_constness_int()`. + */ + public static int test_constness_int(int _1, java.lang.Integer _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_int.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_constness_str`. + * + * Calls `MR_CSharp_test_constness_str()`. + */ + public static mrbind_test.mr.cs.std_string test_constness_str(java.lang.String _1, java.lang.String _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, _2); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_str.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1), __str__2, mrbind_test.Ffi.end(__str__2)); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how we adjust keywords in parameter names. + * \param params blah + * @param params blah + * `params` 'params' "params" params huhparams paramshuh \p params \c params @p params @c params \A params @A params + * In this comment, only quoted and `\param ...` uses are adjusted, and not standalone occurences of the word (even if it's a separate word, let alone if it's just a part of a word). + * `\c ...` and `\p ...` are handled, but unknown tags like `\A ...` are not. + * This is also handled, naturally, because we handle quotes. + * Generated from function `MR::CSharp::test_keyword_in_param_name`. + * + * Calls `MR_CSharp_test_keyword_in_param_name()`. + */ + public static void test_keyword_in_param_name(int params) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_keyword_in_param_name.invokeExact(params); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E1.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E1.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E1(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E1.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E1()`. + */ + public static mrbind_test.mr.csharp.E1 test_enum_crref(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E1_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E1 test_enum_cptr(mrbind_test.mr.csharp.E1 a, mrbind_test.mr.csharp.E1 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value)), c); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum`. + * + * Calls `MR_CSharp_test_enum_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E2.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ref`. + * + * Calls `MR_CSharp_test_enum_ref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cref`. + * + * Calls `MR_CSharp_test_enum_cref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_rref`. + * + * Calls `MR_CSharp_test_enum_rref_MR_CSharp_E2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E2(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E2.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_crref`. + * + * Calls `MR_CSharp_test_enum_crref_MR_CSharp_E2()`. + */ + public static mrbind_test.mr.csharp.E2 test_enum_crref(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_ptr`. + * + * Calls `MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_enum_cptr`. + * + * Calls `MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.E2 test_enum_cptr(mrbind_test.mr.csharp.E2 a, mrbind_test.mr.csharp.E2 b, java.lang.foreign.MemorySegment c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value)), c); + return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial`. + * + * Calls `MR_CSharp_test_class_trivial()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ref`. + * + * Calls `MR_CSharp_test_class_trivial_ref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cref`. + * + * Calls `MR_CSharp_test_class_trivial_cref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_rref`. + * + * Calls `MR_CSharp_test_class_trivial_rref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_rref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_crref`. + * + * Calls `MR_CSharp_test_class_trivial_crref()`. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_crref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_ptr`. + * + * Calls `MR_CSharp_test_class_trivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_ptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_trivial_cptr`. + * + * Calls `MR_CSharp_test_class_trivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.Trivial test_class_trivial_cptr(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.csharp.Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial`. + * + * Calls `MR_CSharp_test_class_nontrivial()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ref`. + * + * Calls `MR_CSharp_test_class_nontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cref`. + * + * Calls `MR_CSharp_test_class_nontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_rref`. + * + * Calls `MR_CSharp_test_class_nontrivial_rref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_rref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_crref`. + * + * Calls `MR_CSharp_test_class_nontrivial_crref()`. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_crref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_nontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_nontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cptr(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_void_ptr`. + * + * Calls `MR_CSharp_test_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_void_cptr`. + * + * Calls `MR_CSharp_test_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_void_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::mark_se_as_shared`. + * + * Calls `MR_CSharp_mark_se_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE mark_se_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_se_as_shared.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Poking a shared pointer type for a single class causes `std::shared_ptr` to be instantiated for the entire hierarchy (when `--bind-shared-ptr-virally`, which is required for `C#`). + * Generated from function `MR::CSharp::test_shptr`. + * + * Calls `MR_CSharp_test_shptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ref`. + * + * Calls `MR_CSharp_test_shptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cref`. + * + * Calls `MR_CSharp_test_shptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_rref`. + * + * Calls `MR_CSharp_test_shptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_rref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_crref`. + * + * Calls `MR_CSharp_test_shptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_crref(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_ptr`. + * + * Calls `MR_CSharp_test_shptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shptr_cptr`. + * + * Calls `MR_CSharp_test_shptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cptr(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr`. + * + * Calls `MR_CSharp_test_shcptr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ref`. + * + * Calls `MR_CSharp_test_shcptr_ref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cref`. + * + * Calls `MR_CSharp_test_shcptr_cref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_rref`. + * + * Calls `MR_CSharp_test_shcptr_rref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_rref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_crref`. + * + * Calls `MR_CSharp_test_shcptr_crref()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_crref(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_ptr`. + * + * Calls `MR_CSharp_test_shcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_ptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_shcptr_cptr`. + * + * Calls `MR_CSharp_test_shcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cptr(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::mark_sg_as_shared`. + * + * Calls `MR_CSharp_mark_sg_as_shared()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG mark_sg_as_shared() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_sg_as_shared.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string`. + * + * Calls `MR_CSharp_test_string()`. + */ + public static mrbind_test.mr.cs.std_string test_string(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ref`. + * + * Calls `MR_CSharp_test_string_ref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_ref(mrbind_test.mr.cs.std_string a, mrbind_test.mr.cs.std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cref`. + * + * Calls `MR_CSharp_test_string_cref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_rref`. + * + * Calls `MR_CSharp_test_string_rref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_crref`. + * + * Calls `MR_CSharp_test_string_crref()`. + */ + public static mrbind_test.mr.cs.std_string test_string_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_string_ptr`. + * + * Calls `MR_CSharp_test_string_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_ptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_string_cptr`. + * + * Calls `MR_CSharp_test_string_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string test_string_cptr(mrbind_test.mr.cs.std_string a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview`. + * + * Calls `MR_CSharp_test_stringview()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ref`. + * + * Calls `MR_CSharp_test_stringview_ref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ref(mrbind_test.mr.cs.std_string_view a, mrbind_test.mr.cs.std_string_view b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cref`. + * + * Calls `MR_CSharp_test_stringview_cref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_rref`. + * + * Calls `MR_CSharp_test_stringview_rref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_crref`. + * + * Calls `MR_CSharp_test_stringview_crref()`. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_ptr`. + * + * Calls `MR_CSharp_test_stringview_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_ptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_stringview_cptr`. + * + * Calls `MR_CSharp_test_stringview_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_string_view test_stringview_cptr(mrbind_test.mr.cs.std_string_view a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath`. + * + * Calls `MR_CSharp_test_fspath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ref`. + * + * Calls `MR_CSharp_test_fspath_ref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ref(mrbind_test.mr.cs.std_filesystem_path a, mrbind_test.mr.cs.std_filesystem_path b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cref`. + * + * Calls `MR_CSharp_test_fspath_cref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_rref`. + * + * Calls `MR_CSharp_test_fspath_rref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_rref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_crref`. + * + * Calls `MR_CSharp_test_fspath_crref()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_crref(java.lang.String a, java.lang.String b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_ptr`. + * + * Calls `MR_CSharp_test_fspath_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_fspath_cptr`. + * + * Calls `MR_CSharp_test_fspath_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cptr(mrbind_test.mr.cs.std_filesystem_path a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostIncr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrI()`. + */ + public static int opPostDecr(mrbind_test.mr.csharp.IncrDecrI _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsA_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsA _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsA_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsB_int()`. + */ + public static void opAdd(mrbind_test.mr.csharp.StaticOpsLhsB _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsB_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsC_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsC _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsC_int.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_1, "_1").release(), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsD_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsD _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsD_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsE_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsE _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsE_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsF_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsF _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsF_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsG_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsG _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsG_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsLhsH_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsH _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsH_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsA()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsA _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsA.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsB()`. + */ + public static void opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsB _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsB.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsC()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsC _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsC.invokeExact(_1, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_2, "_2").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsD()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsD _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsD.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsE()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsE _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsE.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsF()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsF _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsF.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsG()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsG _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsG.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_StaticOpsRhsH()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsH _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsH.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Fails to inject, becomes a free function. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsEnum_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsEnum _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsEnum_int.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Gets injected into the lhs by default. + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs()`. + */ + public static int opAdd(mrbind_test.mr.csharp.StaticOpsMixedLhs _1, mrbind_test.mr.csharp.StaticOpsMixedRhs _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_float()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonTrivialClassOps _1, float _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonTrivialClassOps_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_float_MR_CSharp_NonTrivialClassOps()`. + */ + public static int opAdd(float _1, mrbind_test.mr.csharp.NonTrivialClassOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_float_MR_CSharp_NonTrivialClassOps.invokeExact(_1, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int()`. + */ + public static int opAdd(mrbind_test.mr.csharp.NonCopyableClassByValueOps _1, int _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator+`. + * + * Calls `MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps()`. + */ + public static int opAdd(int _1, mrbind_test.mr.csharp.NonCopyableClassByValueOps _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial`. + * + * Calls `MR_CSharp_test_class_convtrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ref`. + * + * Calls `MR_CSharp_test_class_convtrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cref`. + * + * Calls `MR_CSharp_test_class_convtrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cref(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convtrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convtrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cptr(mrbind_test.mr.csharp.ConvCtorTrivial a, mrbind_test.mr.csharp.ConvCtorTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial`. + * + * Calls `MR_CSharp_test_class_convnontrivial()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cref`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cref()`. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cref(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_ptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_ptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_class_convnontrivial_cptr`. + * + * Calls `MR_CSharp_test_class_convnontrivial_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial_cptr(mrbind_test.mr.csharp.ConvCtorNonTrivial a, mrbind_test.mr.csharp.ConvCtorNonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int_MR_CSharp_ExposedLayout()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int_MR_CSharp_ExposedLayout()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int_MR_CSharp_ExposedLayout()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayout _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayout()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayout _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayout.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ExposedLayout(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_rref`. + * + * Calls `MR_CSharp_test_exposed_rref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_rref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_crref`. + * + * Calls `MR_CSharp_test_exposed_crref()`. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_crref(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayout a, mrbind_test.mr.csharp.ExposedLayout b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * This broke at one point, so testing it too. + * Generated from function `MR::CSharp::test_exposed_vec`. + * + * Calls `MR_CSharp_test_exposed_vec()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout test_exposed_vec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_vec.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test that capturing lifetime of an exposed struct is a no-op. + * Generated from function `MR::CSharp::asave_ref_in_exposed_layout`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_asave_ref_in_exposed_layout()`. + */ + public static mrbind_test.mr.csharp.NonTrivial asave_ref_in_exposed_layout(mrbind_test.mr.csharp.ExposedLayout ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_asave_ref_in_exposed_layout.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_sub_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator/`. + * + * Calls `MR_C_div_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator%`. + * + * Calls `MR_C_mod_int_MR_CSharp_ExposedLayoutSh()`. + */ + public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_ExposedLayoutSh()`. + */ + public static void opDecr(mrbind_test.mr.csharp.ExposedLayoutSh _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::make_exposed_sh`. + * + * Calls `MR_CSharp_make_exposed_sh()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh make_exposed_sh() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_make_exposed_sh.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed`. + * + * Calls `MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ref`. + * + * Calls `MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cref`. + * + * Calls `MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh()`. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_ptr`. + * + * Calls `MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_exposed_cptr`. + * + * Calls `MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cptr(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.csharp.ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * And try an equality comparison! + * Generated from function `MR::CSharp::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_ExposedLayoutB()`. + */ + public static boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutB _1, mrbind_test.mr.csharp.ExposedLayoutB _2) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_C_equal_MR_CSharp_ExposedLayoutB.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::test_optint`. + * + * Calls `MR_CSharp_test_optint()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint(int a, mrbind_test.mr.cs.std_optional_int b, mrbind_test.mr.cs.std_optional_int c) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ref`. + * + * Calls `MR_CSharp_test_optint_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_ref(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cref`. + * + * Calls `MR_CSharp_test_optint_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_cref(int a, mrbind_test.mr.cs.std_optional_int b) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_ptr`. + * + * Calls `MR_CSharp_test_optint_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_ptr(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optint_cptr`. + * + * Calls `MR_CSharp_test_optint_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_int test_optint_cptr(mrbind_test.mr.cs.std_optional_int a, mrbind_test.mr.cs.std_optional_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr`. + * + * Calls `MR_CSharp_test_optstr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b, mrbind_test.mr.cs.std_optional_std_string c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ref`. + * + * Calls `MR_CSharp_test_optstr_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ref(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cref`. + * + * Calls `MR_CSharp_test_optstr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment a_end, mrbind_test.mr.cs.std_optional_std_string b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cref.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = b; + return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_ptr`. + * + * Calls `MR_CSharp_test_optstr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optstr_cptr`. + * + * Calls `MR_CSharp_test_optstr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cptr(mrbind_test.mr.cs.std_optional_std_string a, mrbind_test.mr.cs.std_optional_std_string b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv`. + * + * Calls `MR_CSharp_test_opttriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ref`. + * + * Calls `MR_CSharp_test_opttriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cref`. + * + * Calls `MR_CSharp_test_opttriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cref(mrbind_test.mr.csharp.Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_ptr`. + * + * Calls `MR_CSharp_test_opttriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_opttriv_cptr`. + * + * Calls `MR_CSharp_test_opttriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv`. + * + * Calls `MR_CSharp_test_optnontriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b, mrbind_test.mr.csharp.NonTrivial c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ref`. + * + * Calls `MR_CSharp_test_optnontriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cref`. + * + * Calls `MR_CSharp_test_optnontriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cref(mrbind_test.mr.csharp.NonTrivial a, mrbind_test.mr.csharp.NonTrivial b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cref.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_ptr`. + * + * Calls `MR_CSharp_test_optnontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optnontriv_cptr`. + * + * Calls `MR_CSharp_test_optnontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial a, mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp`. + * + * Calls `MR_CSharp_test_optshexp()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ref`. + * + * Calls `MR_CSharp_test_optshexp_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cref`. + * + * Calls `MR_CSharp_test_optshexp_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cref(mrbind_test.mr.csharp.ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_ptr`. + * + * Calls `MR_CSharp_test_optshexp_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshexp_cptr`. + * + * Calls `MR_CSharp_test_optshexp_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_optshexp_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh a, mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv`. + * + * Calls `MR_CSharp_test_optshtriv()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, mrbind_test.mr.cs.std_optional_MR_CSharp_SA c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ref`. + * + * Calls `MR_CSharp_test_optshtriv_ref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ref(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cref`. + * + * Calls `MR_CSharp_test_optshtriv_cref()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cref(mrbind_test.mr.csharp.SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_ptr`. + * + * Calls `MR_CSharp_test_optshtriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_optshtriv_cptr`. + * + * Calls `MR_CSharp_test_optshtriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cptr(mrbind_test.mr.cs.std_optional_MR_CSharp_SA a, mrbind_test.mr.cs.std_optional_MR_CSharp_SA b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Tag types: + * Generated from function `MR::CSharp::test_tag`. + * + * Calls `MR_CSharp_test_tag()`. + */ + public static void test_tag() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cref`. + * + * Calls `MR_CSharp_test_tag_cref()`. + */ + public static void test_tag_cref() + { + try + { + mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cref.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_ptr`. + * + * Calls `MR_CSharp_test_tag_ptr()`. + */ + public static boolean test_tag_ptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_ptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_tag_cptr`. + * + * Calls `MR_CSharp_test_tag_cptr()`. + */ + public static boolean test_tag_cptr() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_variant`. + * + * Calls `MR_CSharp_test_variant()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ref`. + * + * Calls `MR_CSharp_test_variant_ref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_ref(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cref`. + * + * Calls `MR_CSharp_test_variant_cref()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_cref(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, mrbind_test.mr.cs.std_variant_std_monostate_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_ptr`. + * + * Calls `MR_CSharp_test_variant_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_ptr(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::CSharp::test_variant_cptr`. + * + * Calls `MR_CSharp_test_variant_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant_cptr(mrbind_test.mr.cs.std_variant_std_monostate_int_float a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + java.lang.Object __owner = a; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Test a variant that has duplicate element types. + * Generated from function `MR::CSharp::test_variant_with_repeated_types`. + * + * Calls `MR_CSharp_test_variant_with_repeated_types()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float test_variant_with_repeated_types() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_with_repeated_types.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Input and output streams: + * Generated from function `MR::CSharp::test_iostreams_ref`. + * + * Calls `MR_CSharp_test_iostreams_ref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_ptr`. + * + * Calls `MR_CSharp_test_iostreams_ptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_ptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cref`. + * + * Calls `MR_CSharp_test_iostreams_cref()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cref(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.Object __owner = _1; + return new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_iostreams_cptr`. + * + * Calls `MR_CSharp_test_iostreams_cptr()`. + */ + public static mrbind_test.mr.cs.std_ostream test_iostreams_cptr(mrbind_test.mr.cs.std_istream _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr`. + * + * Calls `MR_CSharp_test_uniqueptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_uniqueptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ref`. + * + * Calls `MR_CSharp_test_uniqueptr_ref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ref(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ref.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release()); + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cref`. + * + * Calls `MR_CSharp_test_uniqueptr_cref()`. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cref(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_ptr`. + * + * Calls `MR_CSharp_test_uniqueptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ptr(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ptr.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release(), c); + return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_uniqueptr_cptr`. + * + * Calls `MR_CSharp_test_uniqueptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cptr(mrbind_test.mr.cs.std_unique_ptr_int a, mrbind_test.mr.cs.std_unique_ptr_int b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ref`. + * + * Calls `MR_CSharp_test_plainarr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cref`. + * + * Calls `MR_CSharp_test_plainarr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_rref`. + * + * Calls `MR_CSharp_test_plainarr_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_crref`. + * + * Calls `MR_CSharp_test_plainarr_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_crref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_ptr`. + * + * Calls `MR_CSharp_test_plainarr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr_cptr`. + * + * Calls `MR_CSharp_test_plainarr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ref`. + * + * Calls `MR_CSharp_test_plainarr2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cref`. + * + * Calls `MR_CSharp_test_plainarr2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_rref`. + * + * Calls `MR_CSharp_test_plainarr2_rref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_rref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_rref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_crref`. + * + * Calls `MR_CSharp_test_plainarr2_crref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_crref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_crref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_ptr`. + * + * Calls `MR_CSharp_test_plainarr2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarr2_cptr`. + * + * Calls `MR_CSharp_test_plainarr2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarr2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ref`. + * + * Calls `MR_CSharp_test_plainarrenum_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cref`. + * + * Calls `MR_CSharp_test_plainarrenum_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ref`. + * + * Calls `MR_CSharp_test_plainarrenum2_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cref`. + * + * Calls `MR_CSharp_test_plainarrenum2_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_ptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_plainarrenum2_cptr`. + * + * Calls `MR_CSharp_test_plainarrenum2_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_plainarrenum2_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Some multi-level pointer madness: + * Generated from function `MR::CSharp::test_ptrs1`. + * + * Calls `MR_CSharp_test_ptrs1()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs1(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs1.invokeExact(ptr, ref); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_ptrs2`. + * + * Calls `MR_CSharp_test_ptrs2()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_ptrs2(java.lang.foreign.MemorySegment ptr, java.lang.foreign.MemorySegment ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs2.invokeExact(ptr, ref); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ref`. + * + * Calls `MR_CSharp_test_intptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cref`. + * + * Calls `MR_CSharp_test_intptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_ptr`. + * + * Calls `MR_CSharp_test_intptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptr_cptr`. + * + * Calls `MR_CSharp_test_intptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ref`. + * + * Calls `MR_CSharp_test_intcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cref`. + * + * Calls `MR_CSharp_test_intcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_ptr`. + * + * Calls `MR_CSharp_test_intcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intcptr_cptr`. + * + * Calls `MR_CSharp_test_intcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ref`. + * + * Calls `MR_CSharp_test_intptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cref`. + * + * Calls `MR_CSharp_test_intptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_ptr`. + * + * Calls `MR_CSharp_test_intptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_intptrptr_cptr`. + * + * Calls `MR_CSharp_test_intptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_intptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ref`. + * + * Calls `MR_CSharp_test_voidptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cref`. + * + * Calls `MR_CSharp_test_voidptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_ptr`. + * + * Calls `MR_CSharp_test_voidptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptr_cptr`. + * + * Calls `MR_CSharp_test_voidptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ref`. + * + * Calls `MR_CSharp_test_voidptrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cref`. + * + * Calls `MR_CSharp_test_voidptrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_ptr`. + * + * Calls `MR_CSharp_test_voidptrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_voidptrptr_cptr`. + * + * Calls `MR_CSharp_test_voidptrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_voidptrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ref`. + * + * Calls `MR_CSharp_test_arrptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cref`. + * + * Calls `MR_CSharp_test_arrptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_ptr`. + * + * Calls `MR_CSharp_test_arrptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrptr_cptr`. + * + * Calls `MR_CSharp_test_arrptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ref`. + * + * Calls `MR_CSharp_test_arrcptr_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cref`. + * + * Calls `MR_CSharp_test_arrcptr_cref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cref(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cref.invokeExact(a, b); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_ptr`. + * + * Calls `MR_CSharp_test_arrcptr_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_ptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_arrcptr_cptr`. + * + * Calls `MR_CSharp_test_arrcptr_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment test_arrcptr_cptr(java.lang.foreign.MemorySegment a, java.lang.foreign.MemorySegment b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cptr.invokeExact(a, b, c); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflicts`. + * + * Calls `MR_CSharp_nameConflicts()`. + */ + public static void nameConflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflicts.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::nameConflictsExposed`. + * + * Calls `MR_CSharp_nameConflictsExposed()`. + */ + public static void nameConflictsExposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflictsExposed.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_int()`. + */ + public static void template_a(int _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_int.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test how template arguments are added to function names when needed to avoid ambiguities. + * Generated from function `MR::CSharp::template_a`. + * + * Calls `MR_CSharp_template_a_float()`. + */ + public static void template_a(float _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_float.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_int()`. + */ + public static int template_b_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_int.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_b`. + * + * Calls `MR_CSharp_template_b_float()`. + */ + public static float template_b_float() + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_float.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_int()`. + */ + public static void template_c_int() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_int.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::template_c`. + * + * Calls `MR_CSharp_template_c_float()`. + */ + public static void template_c_float() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_float.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::instantiate`. + * + * Calls `MR_CSharp_instantiate()`. + */ + public static void instantiate() + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_instantiate.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator-`. + * + * Calls `MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opNeg_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Since this returns void, it gets rewritten into a method. + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator!`. + * + * Calls `MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static void opNot_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csharp.ConstNonconstConflicts _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::CSharp::operator&`. + * + * Calls `MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref()`. + */ + public static int opBitand_int_const_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbind_test.mr.csharp.ConstNonconstConflicts _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * + * Calls `MR_C_deref_const_MR_CSharp_LifetimesB_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesB b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + java.lang.Object __owner = b; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_const_MR_CSharp_LifetimesC_ref()`. + */ + public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesC()`. + */ + public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.LifetimesC c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_MR_CSharp_LifetimesC.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + java.lang.Object __owner = c; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(c); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableD_ref()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableD self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableE_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.csharp.IterableE self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer begin_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_const_MR_CSharp_IterableF_ref()`. + */ + public static java.lang.Integer end_const_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_MR_CSharp_IterableF_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end_MR_CSharp_IterableF_ref(mrbind_test.mr.csharp.IterableF self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::begin`. + * + * Calls `MR_CSharp_begin_int()`. + */ + public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableL_int self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Generated from function `MR::CSharp::end`. + * + * Calls `MR_CSharp_end_int()`. + */ + public static java.lang.Integer end(mrbind_test.mr.csharp.IterableL_int self) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(self); + } + } + + /** + * Vectors of pointers to a class. + * Currently `IEnumerable` is disabled for those, it needs to be fixed. + * Generated from function `MR::CSharp::test_vec_of_mut_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_mut_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr test_vec_of_mut_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_mut_ptr_to_class.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_vec_of_const_ptr_to_class`. + * + * Calls `MR_CSharp_test_vec_of_const_ptr_to_class()`. + */ + public static mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr test_vec_of_const_ptr_to_class() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_const_ptr_to_class.invokeExact(); + return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test decomposition for certain whitelisted standard tuple-like types: (tuples and pairs) + * Generated from function `MR::CSharp::get_tuple0`. + * + * Calls `MR_CSharp_get_tuple0()`. + */ + public static mrbind_test.mr.cs.std_tuple get_tuple0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple0.invokeExact(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple1`. + * + * Calls `MR_CSharp_get_tuple1()`. + */ + public static mrbind_test.mr.cs.std_tuple_int get_tuple1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple1.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple2`. + * + * Calls `MR_CSharp_get_tuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_std_string get_tuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple2.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_pair2`. + * + * Calls `MR_CSharp_get_pair2()`. + */ + public static mrbind_test.mr.cs.std_pair_int_std_string get_pair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_pair2.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_const`. + * + * Calls `MR_CSharp_get_tuple_const()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_std_string get_tuple_const() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_const.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_refs`. + * + * Calls `MR_CSharp_get_tuple_refs()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref get_tuple_refs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_refs.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_crefs`. + * + * Calls `MR_CSharp_get_tuple_crefs()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref get_tuple_crefs() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_crefs.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_value`. + * + * Calls `MR_CSharp_get_tuple_exposed_value()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout get_tuple_exposed_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_value.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_lvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_lvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref get_tuple_exposed_lvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_lvalue_ref.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::get_tuple_exposed_rvalue_ref`. + * + * Calls `MR_CSharp_get_tuple_exposed_rvalue_ref()`. + */ + public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref get_tuple_exposed_rvalue_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_rvalue_ref.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int`. + * + * Calls `MR_CSharp_test_expected_int()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ref`. + * + * Calls `MR_CSharp_test_expected_int_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ref(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cref`. + * + * Calls `MR_CSharp_test_expected_int_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cref(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_ptr`. + * + * Calls `MR_CSharp_test_expected_int_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ptr(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_int_cptr`. + * + * Calls `MR_CSharp_test_expected_int_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cptr(mrbind_test.mr.cs.std_expected_int_float a, mrbind_test.mr.cs.std_expected_int_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void`. + * + * Calls `MR_CSharp_test_expected_void()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ref`. + * + * Calls `MR_CSharp_test_expected_void_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ref(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cref`. + * + * Calls `MR_CSharp_test_expected_void_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cref(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_ptr`. + * + * Calls `MR_CSharp_test_expected_void_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ptr(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_void_cptr`. + * + * Calls `MR_CSharp_test_expected_void_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cptr(mrbind_test.mr.cs.std_expected_void_float a, mrbind_test.mr.cs.std_expected_void_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum`. + * + * Calls `MR_CSharp_test_expected_enum()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ref`. + * + * Calls `MR_CSharp_test_expected_enum_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cref`. + * + * Calls `MR_CSharp_test_expected_enum_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_ptr`. + * + * Calls `MR_CSharp_test_expected_enum_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_enum_cptr`. + * + * Calls `MR_CSharp_test_expected_enum_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_enum_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv`. + * + * Calls `MR_CSharp_test_expected_triv()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ref`. + * + * Calls `MR_CSharp_test_expected_triv_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cref`. + * + * Calls `MR_CSharp_test_expected_triv_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_ptr`. + * + * Calls `MR_CSharp_test_expected_triv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_triv_cptr`. + * + * Calls `MR_CSharp_test_expected_triv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expected_triv_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv`. + * + * Calls `MR_CSharp_test_expected_nontriv()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ref`. + * + * Calls `MR_CSharp_test_expected_nontriv_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cref`. + * + * Calls `MR_CSharp_test_expected_nontriv_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_ptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_nontriv_cptr`. + * + * Calls `MR_CSharp_test_expected_nontriv_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_expected_nontriv_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared`. + * + * Calls `MR_CSharp_test_expected_shared()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ref`. + * + * Calls `MR_CSharp_test_expected_shared_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cref`. + * + * Calls `MR_CSharp_test_expected_shared_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_shared_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed`. + * + * Calls `MR_CSharp_test_expected_exposed()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_expected_exposed_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared`. + * + * Calls `MR_CSharp_test_expected_exposed_shared()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cref`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cref()`. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cref(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_ptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_ptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::CSharp::test_expected_exposed_shared_cptr`. + * + * Calls `MR_CSharp_test_expected_exposed_shared_cptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float test_expected_exposed_shared_cptr(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float a, mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float b, java.lang.foreign.MemorySegment c) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + java.lang.Object __owner = null; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java new file mode 100644 index 00000000..24cf0427 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java @@ -0,0 +1,332 @@ +package mrbind_test.mr.csharp; + +/** + * Even if the secondary bases are virtual, this doesn't affect anything. + * Generated from class `MR::CSharp::G`. + * Base classes: + * Virtual: + * `MR::CSharp::E` + * Direct: (non-virtual) + * `MR::CSharp::A` + * `MR::CSharp::D` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class G extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public G(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? G::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_G_DefaultConstruct()`. + */ + public G() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::G::G`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_G_ConstructFromAnother()`. + */ + public G(mrbind_test.mr.csharp.G _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::G::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_G_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.G(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::G::foo`. + * + * Calls `MR_CSharp_G_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::bar`. + * + * Calls `MR_CSharp_G_bar()`. + */ + public void bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::static_foo`. + * + * Calls `MR_CSharp_G_static_foo()`. + */ + public static void static_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::G::static_bar`. + * + * Calls `MR_CSharp_G_static_bar()`. + */ + public static void static_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_bar.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::CSharp::G::virtual_foo`. + * + * Calls `MR_CSharp_G_virtual_foo()`. + */ + public void virtual_foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::virtual_bar`. + * + * Calls `MR_CSharp_G_virtual_bar()`. + */ + public void virtual_bar(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_bar.invokeExact(rawPointer(), _1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::refs`. + * + * Calls `MR_CSharp_G_refs()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, java.lang.foreign.MemorySegment _2) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_refs.invokeExact(rawPointer(), x, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::d1`. + * + * Calls `MR_CSharp_G_d1()`. + */ + public void d1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::d2`. + * + * Calls `MR_CSharp_G_d2()`. + */ + public void d2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::e1`. + * + * Calls `MR_CSharp_G_e1()`. + */ + public void e1() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e1.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::G::e2`. + * + * Calls `MR_CSharp_G_e2()`. + */ + public void e2() + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e2.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java new file mode 100644 index 00000000..fb59f58d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is the happy path. + * This emits static operators in the const half, and non-static operators (or functions pre C# 14) in the non-const half. + * Generated from class `MR::CSharp::IncrDecrA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrA_DefaultConstruct()`. + */ + public IncrDecrA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrA::IncrDecrA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrA_ConstructFromAnother()`. + */ + public IncrDecrA(mrbind_test.mr.csharp.IncrDecrA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrA assignFromAnother(mrbind_test.mr.csharp.IncrDecrA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrA::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrA()`. + */ + public mrbind_test.mr.csharp.IncrDecrA opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java new file mode 100644 index 00000000..481d85d5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -0,0 +1,192 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Same as above, but everything gets emitted in the const half. + * Generated from class `MR::CSharp::IncrDecrB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrB_DefaultConstruct()`. + */ + public IncrDecrB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrB::IncrDecrB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrB_ConstructFromAnother()`. + */ + public IncrDecrB(mrbind_test.mr.csharp.IncrDecrB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrB assignFromAnother(mrbind_test.mr.csharp.IncrDecrB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrB::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrB()`. + */ + public mrbind_test.mr.csharp.IncrDecrB opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java new file mode 100644 index 00000000..04381a7c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are not marked const, so they're also in the non-const half. + * Generated from class `MR::CSharp::IncrDecrC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrC_DefaultConstruct()`. + */ + public IncrDecrC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrC::IncrDecrC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrC_ConstructFromAnother()`. + */ + public IncrDecrC(mrbind_test.mr.csharp.IncrDecrC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrC assignFromAnother(mrbind_test.mr.csharp.IncrDecrC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrC::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrC()`. + */ + public mrbind_test.mr.csharp.IncrDecrC opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java new file mode 100644 index 00000000..0c342127 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java @@ -0,0 +1,193 @@ +package mrbind_test.mr.csharp; + +/** + * This is a somewhat happy path. Since here the copy ctor takes a non-const reference, the static operators get added to the non-const half. + * The non-static ones are in the const half due to being marked const. + * Generated from class `MR::CSharp::IncrDecrD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrD_DefaultConstruct()`. + */ + public IncrDecrD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrD::IncrDecrD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrD_ConstructFromAnother()`. + */ + public IncrDecrD(mrbind_test.mr.csharp.IncrDecrD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrD assignFromAnother(mrbind_test.mr.csharp.IncrDecrD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrD::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrD()`. + */ + public mrbind_test.mr.csharp.IncrDecrD opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java new file mode 100644 index 00000000..5bf4f92e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the non-const half. + * Generated from class `MR::CSharp::IncrDecrE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrE_DefaultConstruct()`. + */ + public IncrDecrE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrE::IncrDecrE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrE_ConstructFromAnother()`. + */ + public IncrDecrE(mrbind_test.mr.csharp.IncrDecrE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrE::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrE()`. + */ + public mrbind_test.mr.csharp.IncrDecrE opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java new file mode 100644 index 00000000..0656b24b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * Here we don't special-case those operators due to the class being non-copyable (and not trivially movable). They get spawned as functions as usual, in the const half. + * Generated from class `MR::CSharp::IncrDecrF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrF_DefaultConstruct()`. + */ + public IncrDecrF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrF::IncrDecrF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrF_ConstructFromAnother()`. + */ + public IncrDecrF(mrbind_test.mr.csharp.IncrDecrF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrF::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrF()`. + */ + public mrbind_test.mr.csharp.IncrDecrF opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java new file mode 100644 index 00000000..0dbcefea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrG_DefaultConstruct()`. + */ + public IncrDecrG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrG::IncrDecrG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrG_ConstructFromAnother()`. + */ + public IncrDecrG(mrbind_test.mr.csharp.IncrDecrG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrG::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrG()`. + */ + public mrbind_test.mr.csharp.IncrDecrG opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java new file mode 100644 index 00000000..6bcf3bf8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java @@ -0,0 +1,167 @@ +package mrbind_test.mr.csharp; + +/** + * This class is non-copyable, but is trivially movable, so we treat it as if it was copyable. + * Generated from class `MR::CSharp::IncrDecrH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrH_DefaultConstruct()`. + */ + public IncrDecrH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrH::IncrDecrH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrH_ConstructFromAnother()`. + */ + public IncrDecrH(mrbind_test.mr.csharp.IncrDecrH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator++`. + * + * Calls `MR_C_post_incr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostIncr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrH::operator--`. + * + * Calls `MR_C_post_decr_MR_CSharp_IncrDecrH()`. + */ + public mrbind_test.mr.csharp.IncrDecrH opPostDecr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java new file mode 100644 index 00000000..6aa6c10e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * Friend functions. + * Generated from class `MR::CSharp::IncrDecrI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IncrDecrI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IncrDecrI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IncrDecrI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IncrDecrI_DefaultConstruct()`. + */ + public IncrDecrI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IncrDecrI::IncrDecrI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IncrDecrI_ConstructFromAnother()`. + */ + public IncrDecrI(mrbind_test.mr.csharp.IncrDecrI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IncrDecrI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IncrDecrI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IncrDecrI assignFromAnother(mrbind_test.mr.csharp.IncrDecrI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IncrDecrI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java new file mode 100644 index 00000000..b04408bf --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.csharp; + +/** + * Subscription operator. + * Generated from class `MR::CSharp::IndexerA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerA_DefaultConstruct()`. + */ + public IndexerA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerA` elementwise. + * + * Calls `MR_CSharp_IndexerA_ConstructFrom()`. + */ + public IndexerA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerA::IndexerA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerA_ConstructFromAnother()`. + */ + public IndexerA(mrbind_test.mr.csharp.IndexerA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerA assignFromAnother(mrbind_test.mr.csharp.IndexerA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerA::operator[]`. + * + * Calls `MR_CSharp_IndexerA_index()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment index(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_index.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerA` named `x`. + * + * Calls `MR_CSharp_IndexerA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java new file mode 100644 index 00000000..9b54a2fc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java @@ -0,0 +1,245 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerB_DefaultConstruct()`. + */ + public IndexerB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IndexerB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFrom()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.IndexerA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerB::IndexerB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerB_ConstructFromAnother()`. + */ + public IndexerB(mrbind_test.mr.csharp.IndexerB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerB assignFromAnother(mrbind_test.mr.csharp.IndexerB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_1()`. + */ + public mrbind_test.mr.csharp.IndexerA index_1(int i) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_1.invokeExact(rawPointer(), i); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_2()`. + */ + public mrbind_test.mr.csharp.IndexerA index_2(int i, int j) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_2.invokeExact(rawPointer(), i, j); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerB::operator[]`. + * + * Calls `MR_CSharp_IndexerB_index_0()`. + */ + public mrbind_test.mr.csharp.IndexerA index_0() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_0.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IndexerB_Get_a()`. + */ + public mrbind_test.mr.csharp.IndexerA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IndexerB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_IndexerB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.IndexerA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java new file mode 100644 index 00000000..ad8df4b1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java @@ -0,0 +1,145 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IndexerC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IndexerC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IndexerC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IndexerC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IndexerC_DefaultConstruct()`. + */ + public IndexerC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IndexerC::IndexerC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IndexerC_ConstructFromAnother()`. + */ + public IndexerC(mrbind_test.mr.csharp.IndexerC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IndexerC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IndexerC assignFromAnother(mrbind_test.mr.csharp.IndexerC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IndexerC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index_mut()`. + */ + public int index_mut(int i) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index_mut.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IndexerC::operator[]`. + * + * Calls `MR_CSharp_IndexerC_index()`. + */ + public float index(int i) + { + try + { + float __ret = (float)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index.invokeExact(rawPointer(), i); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java new file mode 100644 index 00000000..fad994af --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java @@ -0,0 +1,187 @@ +package mrbind_test.mr.csharp; + +/** + * Const member functions. + * Generated from class `MR::CSharp::IterableA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableA_DefaultConstruct()`. + */ + public IterableA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableA::IterableA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableA_ConstructFromAnother()`. + */ + public IterableA(mrbind_test.mr.csharp.IterableA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableA assignFromAnother(mrbind_test.mr.csharp.IterableA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::begin`. + * + * Calls `MR_CSharp_IterableA_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableA::end`. + * + * Calls `MR_CSharp_IterableA_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableA` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableA_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableA` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableA_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java new file mode 100644 index 00000000..cd6c73cc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java @@ -0,0 +1,187 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable member functions. + * Generated from class `MR::CSharp::IterableB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableB_DefaultConstruct()`. + */ + public IterableB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableB::IterableB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableB_ConstructFromAnother()`. + */ + public IterableB(mrbind_test.mr.csharp.IterableB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableB assignFromAnother(mrbind_test.mr.csharp.IterableB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::begin`. + * + * Calls `MR_CSharp_IterableB_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableB::end`. + * + * Calls `MR_CSharp_IterableB_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableB` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableB_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableB` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableB_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java new file mode 100644 index 00000000..46b91147 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java @@ -0,0 +1,231 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable member functions. + * Generated from class `MR::CSharp::IterableC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableC_DefaultConstruct()`. + */ + public IterableC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableC::IterableC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableC_ConstructFromAnother()`. + */ + public IterableC(mrbind_test.mr.csharp.IterableC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableC assignFromAnother(mrbind_test.mr.csharp.IterableC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * + * Calls `MR_CSharp_IterableC_begin_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * + * Calls `MR_CSharp_IterableC_end_mut()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end_mut.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::begin`. + * + * Calls `MR_CSharp_IterableC_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableC::end`. + * + * Calls `MR_CSharp_IterableC_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableC` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableC_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableC` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableC_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java new file mode 100644 index 00000000..a4b5795f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Const free functions. + * Generated from class `MR::CSharp::IterableD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableD_DefaultConstruct()`. + */ + public IterableD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableD::IterableD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableD_ConstructFromAnother()`. + */ + public IterableD(mrbind_test.mr.csharp.IterableD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableD assignFromAnother(mrbind_test.mr.csharp.IterableD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableD` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableD_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableD` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableD_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java new file mode 100644 index 00000000..54727fbe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Mutable free functions. + * Generated from class `MR::CSharp::IterableE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableE_DefaultConstruct()`. + */ + public IterableE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableE::IterableE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableE_ConstructFromAnother()`. + */ + public IterableE(mrbind_test.mr.csharp.IterableE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableE assignFromAnother(mrbind_test.mr.csharp.IterableE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableE` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableE_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableE` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableE_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java new file mode 100644 index 00000000..1d209312 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Both const and mutable free functions. + * Generated from class `MR::CSharp::IterableF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableF_DefaultConstruct()`. + */ + public IterableF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableF::IterableF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableF_ConstructFromAnother()`. + */ + public IterableF(mrbind_test.mr.csharp.IterableF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableF assignFromAnother(mrbind_test.mr.csharp.IterableF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableF` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableF_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableF` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableF_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java new file mode 100644 index 00000000..771edab9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable class instances. + * Generated from class `MR::CSharp::IterableG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableG_DefaultConstruct()`. + */ + public IterableG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableG::IterableG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableG_ConstructFromAnother()`. + */ + public IterableG(mrbind_test.mr.csharp.IterableG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableG assignFromAnother(mrbind_test.mr.csharp.IterableG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::begin`. + * + * Calls `MR_CSharp_IterableG_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableG::end`. + * + * Calls `MR_CSharp_IterableG_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableG` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableG_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableG` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableG_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java new file mode 100644 index 00000000..5f67973f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const class instances. + * Generated from class `MR::CSharp::IterableH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableH_DefaultConstruct()`. + */ + public IterableH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableH::IterableH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableH_ConstructFromAnother()`. + */ + public IterableH(mrbind_test.mr.csharp.IterableH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.IterableH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableH::begin`. + * + * Calls `MR_CSharp_IterableH_begin()`. + */ + public mrbind_test.mr.cs.std_string begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableH::end`. + * + * Calls `MR_CSharp_IterableH_end()`. + */ + public mrbind_test.mr.cs.std_string end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableH` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableH_Get_arr()`. + */ + public mrbind_test.mr.cs.std_string arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableH` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableH_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java new file mode 100644 index 00000000..0348aeca --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.csharp; + +/** + * Returning mutable exposed struct instances. + * Generated from class `MR::CSharp::IterableI`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableI extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableI(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableI::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableI_DefaultConstruct()`. + */ + public IterableI() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableI::IterableI`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableI_ConstructFromAnother()`. + */ + public IterableI(mrbind_test.mr.csharp.IterableI _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableI_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.IterableI _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::begin`. + * + * Calls `MR_CSharp_IterableI_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableI::end`. + * + * Calls `MR_CSharp_IterableI_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableI` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableI_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableI` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableI_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java new file mode 100644 index 00000000..0d50b659 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java @@ -0,0 +1,191 @@ +package mrbind_test.mr.csharp; + +/** + * Returning const exposed struct instances. + * Generated from class `MR::CSharp::IterableJ`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableJ extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableJ(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableJ::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableJ_DefaultConstruct()`. + */ + public IterableJ() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableJ::IterableJ`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableJ_ConstructFromAnother()`. + */ + public IterableJ(mrbind_test.mr.csharp.IterableJ _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableJ_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableJ assignFromAnother(mrbind_test.mr.csharp.IterableJ _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableJ(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableJ::begin`. + * + * Calls `MR_CSharp_IterableJ_begin()`. + */ + public mrbind_test.mr.csharp.ExposedLayout begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableJ::end`. + * + * Calls `MR_CSharp_IterableJ_end()`. + */ + public mrbind_test.mr.csharp.ExposedLayout end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableJ` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableJ_Get_arr()`. + */ + public mrbind_test.mr.csharp.ExposedLayout arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableJ` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableJ_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java new file mode 100644 index 00000000..19234ae4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java @@ -0,0 +1,188 @@ +package mrbind_test.mr.csharp; + +/** + * The sentinel having a different type. + * Generated from class `MR::CSharp::IterableK`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_DefaultConstruct()`. + */ + public IterableK() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::IterableK`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_ConstructFromAnother()`. + */ + public IterableK(mrbind_test.mr.csharp.IterableK _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK assignFromAnother(mrbind_test.mr.csharp.IterableK _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Not making those functions `const` for a change. + * Generated from method `MR::CSharp::IterableK::begin`. + * + * Calls `MR_CSharp_IterableK_begin()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_begin.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::end`. + * + * Calls `MR_CSharp_IterableK_end()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_end.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableK` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableK_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java new file mode 100644 index 00000000..381f82fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -0,0 +1,236 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Iter`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Iter extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Iter::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Iter_DefaultConstruct()`. + */ + public IterableK_Iter() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Iter` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Iter(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Iter::Iter`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Iter_ConstructFromAnother()`. + */ + public IterableK_Iter(mrbind_test.mr.csharp.IterableK_Iter _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Iter_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Iter assignFromAnother(mrbind_test.mr.csharp.IterableK_Iter _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Iter(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_IterableK_Iter()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator++`. + * + * Calls `MR_C_incr_MR_CSharp_IterableK_Iter()`. + */ + public void opIncr() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Iter::operator==`. + * + * Calls `MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel()`. + */ + public boolean opEqual(mrbind_test.mr.csharp.IterableK_Sentinel s) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(s); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Iter_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Iter` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Iter_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java new file mode 100644 index 00000000..e78d1451 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -0,0 +1,170 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::IterableK::Sentinel`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableK_Sentinel extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableK_Sentinel::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableK_Sentinel_DefaultConstruct()`. + */ + public IterableK_Sentinel() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::IterableK::Sentinel` elementwise. + * The reference to the parameter `ptr` might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public IterableK_Sentinel(java.lang.foreign.MemorySegment ptr) + { + this(__ctor_constructFrom(ptr), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.foreign.MemorySegment ptr) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableK::Sentinel::Sentinel`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableK_Sentinel_ConstructFromAnother()`. + */ + public IterableK_Sentinel(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableK::Sentinel::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableK_Sentinel_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableK_Sentinel assignFromAnother(mrbind_test.mr.csharp.IterableK_Sentinel _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableK_Sentinel_Get_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::IterableK::Sentinel` named `ptr`. + * The reference to the parameter `value` might be preserved in this object in element `ptr`. + * + * Calls `MR_CSharp_IterableK_Sentinel_Set_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public void setPtr(java.lang.foreign.MemorySegment value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java new file mode 100644 index 00000000..8b0803c1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java @@ -0,0 +1,187 @@ +package mrbind_test.mr.csharp; + +/** + * Templated free functions. + * Generated from class `MR::CSharp::IterableL`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class IterableL_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public IterableL_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? IterableL_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_IterableL_int_DefaultConstruct()`. + */ + public IterableL_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::IterableL::IterableL`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_IterableL_int_ConstructFromAnother()`. + */ + public IterableL_int(mrbind_test.mr.csharp.IterableL_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.IterableL_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_IterableL_int_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.IterableL_int assignFromAnother(mrbind_test.mr.csharp.IterableL_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.IterableL_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::begin`. + * + * Calls `MR_CSharp_IterableL_int_begin()`. + */ + public java.lang.Integer begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_begin.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::IterableL::end`. + * + * Calls `MR_CSharp_IterableL_int_end()`. + */ + public java.lang.Integer end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_end.invokeExact(rawPointer()); + return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::IterableL` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_IterableL_int_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::CSharp::IterableL` named `arr`. The size is `3`. + * + * Calls `MR_CSharp_IterableL_int_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java new file mode 100644 index 00000000..98747191 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java @@ -0,0 +1,215 @@ +package mrbind_test.mr.csharp; + +/** + * Keep-alive sorcery: + * Generated from class `MR::CSharp::LifetimesA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesA_DefaultConstruct()`. + */ + public LifetimesA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesA` elementwise. + * + * Calls `MR_CSharp_LifetimesA_ConstructFrom()`. + */ + public LifetimesA(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesA::LifetimesA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesA_ConstructFromAnother()`. + */ + public LifetimesA(mrbind_test.mr.csharp.LifetimesA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesA assignFromAnother(mrbind_test.mr.csharp.LifetimesA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Some degenerate cases that have to be ignored in C#, because we don't support the lifetime operations for those types. + * Generated from method `MR::CSharp::LifetimesA::foo`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesA_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesA::bar`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesA_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public void bar(java.lang.foreign.MemorySegment ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_bar.invokeExact(rawPointer(), ref); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesA` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesA_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesA` named `x`. + * + * Calls `MR_CSharp_LifetimesA_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java new file mode 100644 index 00000000..75ab3901 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java @@ -0,0 +1,246 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesB_DefaultConstruct()`. + */ + public LifetimesB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesB` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFrom()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesB::LifetimesB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesB_ConstructFromAnother()`. + */ + public LifetimesB(mrbind_test.mr.csharp.LifetimesB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesB assignFromAnother(mrbind_test.mr.csharp.LifetimesB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * `--infer-lifetime-iterators` should act on those: + * Generated from method `MR::CSharp::LifetimesB::begin`. + * + * Calls `MR_CSharp_LifetimesB_begin()`. + */ + public mrbind_test.mr.csharp.LifetimesA begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_begin.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::end`. + * + * Calls `MR_CSharp_LifetimesB_end()`. + */ + public mrbind_test.mr.csharp.LifetimesA end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_end.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesB::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_LifetimesB_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA opMul() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_LifetimesB_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesB_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesB` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesB_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java new file mode 100644 index 00000000..3d0aad96 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_LifetimesC_DefaultConstruct()`. + */ + public LifetimesC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::LifetimesC` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFrom()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesA a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.csharp.LifetimesA a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesC::LifetimesC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesC_ConstructFromAnother()`. + */ + public LifetimesC(mrbind_test.mr.csharp.LifetimesC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesC assignFromAnother(mrbind_test.mr.csharp.LifetimesC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesC_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesC` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesC_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java new file mode 100644 index 00000000..655c49af --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java @@ -0,0 +1,357 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::LifetimesD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_ConstructFromAnother()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Store param references in this. The two annotation styles are equivalent for constructors. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the parameter `ref` might be preserved in the constructed object. + * The reference to the parameter `other_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesD_Construct_2()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + this(__ctor_construct_2(ref, other_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_2(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_2.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * `--infer-lifetime-constructors` should act on this. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesA ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesA(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesA(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Store reference to this in param. + * `--infer-lifetime-constructors` skips this, because we already have custom attributes. + * Generated from constructor `MR::CSharp::LifetimesD::LifetimesD`. + * The reference to the constructed object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB()`. + */ + public LifetimesD(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct_1_MR_CSharp_LifetimesB(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_LifetimesB(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesD assignFromAnother(mrbind_test.mr.csharp.LifetimesD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::get`. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::return_ref_static`. + * The reference to the parameter `ref` might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesD_return_ref_static()`. + */ + public static mrbind_test.mr.csharp.LifetimesA return_ref_static(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref_static.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = ref; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_this`. + * The reference to the parameter `ref` might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_ref_in_param`. + * The reference to the parameter `ref` might be preserved in the parameter `other_ref`. + * + * Calls `MR_CSharp_LifetimesD_store_ref_in_param()`. + */ + public void store_ref_in_param(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test.mr.csharp.LifetimesB other_ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + java.lang.ref.Reference.reachabilityFence(other_ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesD::store_this_in_param`. + * The reference to this object might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesD_store_this_in_param()`. + */ + public void store_this_in_param(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_this_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesD_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesD` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesD_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java new file mode 100644 index 00000000..a2562095 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java @@ -0,0 +1,226 @@ +package mrbind_test.mr.csharp; + +/** + * Nested attributes. + * Generated from class `MR::CSharp::LifetimesE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class LifetimesE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public LifetimesE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? LifetimesE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_LifetimesE_ConstructFromAnother()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::CSharp::LifetimesE::LifetimesE`. + * The reference to things referred to by the constructed object (if any) might be preserved in the parameter `ref`. + * + * Calls `MR_CSharp_LifetimesE_Construct()`. + */ + public LifetimesE(mrbind_test.mr.csharp.LifetimesB ref) + { + this(__ctor_construct(ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.csharp.LifetimesB ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.LifetimesE assignFromAnother(mrbind_test.mr.csharp.LifetimesE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::get`. + * The reference to things referred to by this object (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_get()`. + */ + public mrbind_test.mr.csharp.LifetimesA get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_get.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::return_ref`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in the return value. + * + * Calls `MR_CSharp_LifetimesE_return_ref()`. + */ + public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from method `MR::CSharp::LifetimesE::store_ref_in_this`. + * The reference to things referred to by the parameter `ref` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_LifetimesE_store_ref_in_this()`. + */ + public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_LifetimesE_Get_a()`. + */ + public mrbind_test.mr.csharp.LifetimesA a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::LifetimesE` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_LifetimesE_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.LifetimesA value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java new file mode 100644 index 00000000..1e73d688 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java @@ -0,0 +1,242 @@ +package mrbind_test.mr.csharp; + +/** + * Members having the same name as the exposed class, after rewriting. + * Generated from class `MR::CSharp::NameConflicts`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_DefaultConstruct()`. + */ + public NameConflicts() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::NameConflicts` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFrom()`. + */ + public NameConflicts(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + this(__ctor_constructFrom(name_conflicts, a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int name_conflicts, mrbind_test.mr.csharp.NameConflicts_A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFrom.invokeExact(name_conflicts, mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::NameConflicts`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_ConstructFromAnother()`. + */ + public NameConflicts(mrbind_test.mr.csharp.NameConflicts _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts assignFromAnother(mrbind_test.mr.csharp.NameConflicts _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::name_Conflicts`. + * + * Calls `MR_CSharp_NameConflicts_name_Conflicts()`. + */ + public void name_Conflicts() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_name_Conflicts.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_name_conflicts()`. + */ + public int name_conflicts() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `name_conflicts`. + * + * Calls `MR_CSharp_NameConflicts_Set_name_conflicts()`. + */ + public void setName_conflicts(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_NameConflicts_Get_a()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::NameConflicts` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_CSharp_NameConflicts_Set_a()`. + */ + public void setA(mrbind_test.mr.csharp.NameConflicts_A value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java new file mode 100644 index 00000000..9101fee3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java @@ -0,0 +1,55 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"name_conflicts_exposed", "a"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT}); + public static final long OFF_name_conflicts_exposed = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("name_conflicts_exposed")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 8, 4, "MR::CSharp::NameConflictsExposed");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed copy() {return new NameConflictsExposed(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int name_conflicts_exposed() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed);} + public void setName_conflicts_exposed(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_name_conflicts_exposed, value);} + + public mrbind_test.mr.csharp.NameConflictsExposed_A a() {return new mrbind_test.mr.csharp.NameConflictsExposed_A(segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.csharp.NameConflictsExposed_A value) {segment.asSlice(OFF_a, mrbind_test.mr.csharp.NameConflictsExposed_A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + /** + * Generated from method `MR::CSharp::NameConflictsExposed::name_Conflicts_exposed`. + * + * Calls `MR_CSharp_NameConflictsExposed_name_Conflicts_exposed()`. + */ + public void name_Conflicts_exposed() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflictsExposed_name_Conflicts_exposed.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public NameConflictsExposed() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java new file mode 100644 index 00000000..82e55f43 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed_A.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflictsExposed::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflictsExposed_A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::CSharp::NameConflictsExposed::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflictsExposed_A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public NameConflictsExposed_A copy() {return new NameConflictsExposed_A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(NameConflictsExposed_A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x);} + public void setX(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_x, value);} + + /** Zero-initialized. */ + public NameConflictsExposed_A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java new file mode 100644 index 00000000..55f6ac0c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NameConflicts::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NameConflicts_A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NameConflicts_A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NameConflicts_A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NameConflicts_A_DefaultConstruct()`. + */ + public NameConflicts_A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NameConflicts::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NameConflicts_A_ConstructFromAnother()`. + */ + public NameConflicts_A(mrbind_test.mr.csharp.NameConflicts_A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NameConflicts::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NameConflicts_A_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NameConflicts_A assignFromAnother(mrbind_test.mr.csharp.NameConflicts_A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java new file mode 100644 index 00000000..1c853993 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, so operators with by-value parameters fail to inject. + * Generated from class `MR::CSharp::NonCopyableClassByValueOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonCopyableClassByValueOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonCopyableClassByValueOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonCopyableClassByValueOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct()`. + */ + public NonCopyableClassByValueOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonCopyableClassByValueOps::NonCopyableClassByValueOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother()`. + */ + public NonCopyableClassByValueOps(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonCopyableClassByValueOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonCopyableClassByValueOps assignFromAnother(mrbind_test.mr.csharp.NonCopyableClassByValueOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonCopyableClassByValueOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java new file mode 100644 index 00000000..625b75e9 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivial_DefaultConstruct()`. + */ + public NonTrivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivial::NonTrivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivial_ConstructFromAnother()`. + */ + public NonTrivial(mrbind_test.mr.csharp.NonTrivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp.NonTrivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java new file mode 100644 index 00000000..22825c20 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * Check how non-trivial class types are passed by value into operators. + * Generated from class `MR::CSharp::NonTrivialClassOps`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialClassOps extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialClassOps(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialClassOps::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialClassOps_DefaultConstruct()`. + */ + public NonTrivialClassOps() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialClassOps::NonTrivialClassOps`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialClassOps_ConstructFromAnother()`. + */ + public NonTrivialClassOps(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialClassOps_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialClassOps assignFromAnother(mrbind_test.mr.csharp.NonTrivialClassOps _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialClassOps(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialClassOps::operator+`. + * + * Calls `MR_C_add_MR_CSharp_NonTrivialClassOps_int()`. + */ + public int opAdd(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_add_MR_CSharp_NonTrivialClassOps_int.invokeExact(rawPointer(), _1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java new file mode 100644 index 00000000..484ff171 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::NonTrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonTrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonTrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonTrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_NonTrivialDerived_DefaultConstruct()`. + */ + public NonTrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::NonTrivialDerived::NonTrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_NonTrivialDerived_ConstructFromAnother()`. + */ + public NonTrivialDerived(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::NonTrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_NonTrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.NonTrivialDerived assignFromAnother(mrbind_test.mr.csharp.NonTrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.NonTrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java new file mode 100644 index 00000000..0ad391df --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.csharp; + +/** + * Nested classes. + * Generated from class `MR::CSharp::Outer`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_DefaultConstruct()`. + */ + public Outer() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Outer`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_ConstructFromAnother()`. + */ + public Outer(mrbind_test.mr.csharp.Outer _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer assignFromAnother(mrbind_test.mr.csharp.Outer _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::foo`. + * + * Calls `MR_CSharp_Outer_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java new file mode 100644 index 00000000..357fc310 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java @@ -0,0 +1,122 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Outer::Inner`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Outer_Inner extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Outer_Inner(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Outer_Inner::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Outer_Inner_DefaultConstruct()`. + */ + public Outer_Inner() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Outer::Inner::Inner`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Outer_Inner_ConstructFromAnother()`. + */ + public Outer_Inner(mrbind_test.mr.csharp.Outer_Inner _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Outer_Inner_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Outer_Inner assignFromAnother(mrbind_test.mr.csharp.Outer_Inner _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Outer_Inner(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Outer::Inner::bar`. + * + * Calls `MR_CSharp_Outer_Inner_bar()`. + */ + public void bar() + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_bar.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java new file mode 100644 index 00000000..96429cf4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is const. + * Generated from class `MR::CSharp::RelationalA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalA_DefaultConstruct()`. + */ + public RelationalA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalA::RelationalA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalA_ConstructFromAnother()`. + */ + public RelationalA(mrbind_test.mr.csharp.RelationalA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalA assignFromAnother(mrbind_test.mr.csharp.RelationalA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalA()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalA()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalA()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalA::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalA()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalA _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java new file mode 100644 index 00000000..0d33f09a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The happy path, the operator is non-const. + * Generated from class `MR::CSharp::RelationalB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalB_DefaultConstruct()`. + */ + public RelationalB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalB::RelationalB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalB_ConstructFromAnother()`. + */ + public RelationalB(mrbind_test.mr.csharp.RelationalB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalB assignFromAnother(mrbind_test.mr.csharp.RelationalB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalB()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalB()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalB()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalB::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalB()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalB _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java new file mode 100644 index 00000000..b1e3f4a8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java @@ -0,0 +1,172 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have mixed constness, which causes them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalC_DefaultConstruct()`. + */ + public RelationalC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalC::RelationalC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalC_ConstructFromAnother()`. + */ + public RelationalC(mrbind_test.mr.csharp.RelationalC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalC assignFromAnother(mrbind_test.mr.csharp.RelationalC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalC::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * bool operator<=(RelationalC &) const {return false;} // Skip one operator to observe the function missing. + * Generated from method `MR::CSharp::RelationalC::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java new file mode 100644 index 00000000..92abdcb6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have operands of different types, causing them to be demoted to functions. + * Generated from class `MR::CSharp::RelationalD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalD_DefaultConstruct()`. + */ + public RelationalD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalD::RelationalD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalD_ConstructFromAnother()`. + */ + public RelationalD(mrbind_test.mr.csharp.RelationalD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalD assignFromAnother(mrbind_test.mr.csharp.RelationalD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalD::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC()`. + */ + public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java new file mode 100644 index 00000000..d3c0bff1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java @@ -0,0 +1,194 @@ +package mrbind_test.mr.csharp; + +/** + * The operators have a weird return type. + * Generated from class `MR::CSharp::RelationalE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalE_DefaultConstruct()`. + */ + public RelationalE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalE::RelationalE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalE_ConstructFromAnother()`. + */ + public RelationalE(mrbind_test.mr.csharp.RelationalE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalE assignFromAnother(mrbind_test.mr.csharp.RelationalE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalE::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC()`. + */ + public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java new file mode 100644 index 00000000..faeb0cc5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java @@ -0,0 +1,190 @@ +package mrbind_test.mr.csharp; + +/** + * The operators return void. + * Generated from class `MR::CSharp::RelationalF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class RelationalF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public RelationalF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? RelationalF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_RelationalF_DefaultConstruct()`. + */ + public RelationalF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::RelationalF::RelationalF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_RelationalF_ConstructFromAnother()`. + */ + public RelationalF(mrbind_test.mr.csharp.RelationalF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_RelationalF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp.RelationalF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<`. + * + * Calls `MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLess(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>`. + * + * Calls `MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreater(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator<=`. + * + * Calls `MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::RelationalF::operator>=`. + * + * Calls `MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC()`. + */ + public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java new file mode 100644 index 00000000..56e6972d --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java @@ -0,0 +1,104 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SA`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SA_DefaultConstruct()`. + */ + public SA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SA::SA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SA_ConstructFromAnother()`. + */ + public SA(mrbind_test.mr.csharp.SA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java new file mode 100644 index 00000000..552d900e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SB`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SC` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SB_DefaultConstruct()`. + */ + public SB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SB` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFrom()`. + */ + public SB(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SB::SB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SB_ConstructFromAnother()`. + */ + public SB(mrbind_test.mr.csharp.SB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SB assignFromAnother(mrbind_test.mr.csharp.SB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SB` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SB_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SB` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SB_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java new file mode 100644 index 00000000..94bc02ba --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java @@ -0,0 +1,154 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SC`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SA` + * `MR::CSharp::SB` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SC_DefaultConstruct()`. + */ + public SC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SC::SC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SC_ConstructFromAnother()`. + */ + public SC(mrbind_test.mr.csharp.SC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SC` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SC_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SC` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SC_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java new file mode 100644 index 00000000..f3d453c0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SD`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SD_DefaultConstruct()`. + */ + public SD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SD::SD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SD_ConstructFromAnother()`. + */ + public SD(mrbind_test.mr.csharp.SD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SD::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_SD_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SD assignFromAnother(mrbind_test.mr.csharp.SD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SD(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java new file mode 100644 index 00000000..6804f728 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java @@ -0,0 +1,178 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SE`. + * Derived classes: + * Direct: (non-virtual) + * `MR::CSharp::SF` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SE_DefaultConstruct()`. + */ + public SE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::SE` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFrom()`. + */ + public SE(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SE::SE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SE_ConstructFromAnother()`. + */ + public SE(mrbind_test.mr.csharp.SE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SE assignFromAnother(mrbind_test.mr.csharp.SE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SE` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SE_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SE` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SE_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java new file mode 100644 index 00000000..23e2fca4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java @@ -0,0 +1,154 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::SF`. + * Base classes: + * Direct: (non-virtual) + * `MR::CSharp::SD` + * `MR::CSharp::SE` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_SF_DefaultConstruct()`. + */ + public SF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::SF::SF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_SF_ConstructFromAnother()`. + */ + public SF(mrbind_test.mr.csharp.SF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::SF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_SF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.SF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Make this non-trivial for a change. + * Returns a pointer to a member variable of class `MR::CSharp::SF` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_SF_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Make this non-trivial for a change. + * Modifies a member variable of class `MR::CSharp::SF` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_SF_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SG.java new file mode 100644 index 00000000..32b23914 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SG.java @@ -0,0 +1,26 @@ +package mrbind_test.mr.csharp; + +/** + * Make sure non-passable classes work fine as `std::shared_ptr` template arguments. + * Generated from class `MR::CSharp::SG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class SG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public SG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? SG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsEnum.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsEnum.java new file mode 100644 index 00000000..21fe05b7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsEnum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.csharp; + +/** + * Other injection cases: + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class StaticOpsEnum +{ + public final int value; + + public StaticOpsEnum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static StaticOpsEnum of(int value) + { + return new StaticOpsEnum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof StaticOpsEnum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "StaticOpsEnum(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java new file mode 100644 index 00000000..636a00c6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsLhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsA_DefaultConstruct()`. + */ + public StaticOpsLhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsA::StaticOpsLhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsA_ConstructFromAnother()`. + */ + public StaticOpsLhsA(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java new file mode 100644 index 00000000..4a24ac91 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsLhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsB_DefaultConstruct()`. + */ + public StaticOpsLhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsB::StaticOpsLhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsB_ConstructFromAnother()`. + */ + public StaticOpsLhsB(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java new file mode 100644 index 00000000..11b48c00 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsLhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsC_DefaultConstruct()`. + */ + public StaticOpsLhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsC::StaticOpsLhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsC_ConstructFromAnother()`. + */ + public StaticOpsLhsC(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java new file mode 100644 index 00000000..540e79c6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsD_DefaultConstruct()`. + */ + public StaticOpsLhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsD::StaticOpsLhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsD_ConstructFromAnother()`. + */ + public StaticOpsLhsD(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java new file mode 100644 index 00000000..0add2da7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsE_DefaultConstruct()`. + */ + public StaticOpsLhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsE::StaticOpsLhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsE_ConstructFromAnother()`. + */ + public StaticOpsLhsE(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java new file mode 100644 index 00000000..938e41e1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsLhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsF_DefaultConstruct()`. + */ + public StaticOpsLhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsF::StaticOpsLhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsF_ConstructFromAnother()`. + */ + public StaticOpsLhsF(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsLhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java new file mode 100644 index 00000000..9fbfe7e5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsLhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsG_DefaultConstruct()`. + */ + public StaticOpsLhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsG::StaticOpsLhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsG_ConstructFromAnother()`. + */ + public StaticOpsLhsG(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java new file mode 100644 index 00000000..f00d2f79 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsLhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsLhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsLhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsLhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsLhsH_DefaultConstruct()`. + */ + public StaticOpsLhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsLhsH::StaticOpsLhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsLhsH_ConstructFromAnother()`. + */ + public StaticOpsLhsH(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsLhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsLhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsLhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsLhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsLhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java new file mode 100644 index 00000000..0fb4e8d5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedLhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedLhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedLhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedLhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_DefaultConstruct()`. + */ + public StaticOpsMixedLhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedLhs::StaticOpsMixedLhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother()`. + */ + public StaticOpsMixedLhs(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedLhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedLhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedLhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedLhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedLhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java new file mode 100644 index 00000000..1aa7230a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StaticOpsMixedRhs`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsMixedRhs extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsMixedRhs(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsMixedRhs::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_DefaultConstruct()`. + */ + public StaticOpsMixedRhs() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsMixedRhs::StaticOpsMixedRhs`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother()`. + */ + public StaticOpsMixedRhs(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsMixedRhs::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsMixedRhs_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsMixedRhs assignFromAnother(mrbind_test.mr.csharp.StaticOpsMixedRhs _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsMixedRhs(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java new file mode 100644 index 00000000..df37f16b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator is injected correctly. + * Generated from class `MR::CSharp::StaticOpsRhsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsA_DefaultConstruct()`. + */ + public StaticOpsRhsA() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsA::StaticOpsRhsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsA_ConstructFromAnother()`. + */ + public StaticOpsRhsA(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsA_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsA assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsA(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java new file mode 100644 index 00000000..a96e7825 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The operator injects but becomes a function, because it returns void. + * Generated from class `MR::CSharp::StaticOpsRhsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsB_DefaultConstruct()`. + */ + public StaticOpsRhsB() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsB::StaticOpsRhsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsB_ConstructFromAnother()`. + */ + public StaticOpsRhsB(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsB_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsB assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsB(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java new file mode 100644 index 00000000..ab1ad306 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The operator fails to inject because the class isn't copyable (and isn't trivially movable), and the operator takes it by value. + * Generated from class `MR::CSharp::StaticOpsRhsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsC_DefaultConstruct()`. + */ + public StaticOpsRhsC() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsC::StaticOpsRhsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsC_ConstructFromAnother()`. + */ + public StaticOpsRhsC(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java new file mode 100644 index 00000000..e155b6a1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java @@ -0,0 +1,77 @@ +package mrbind_test.mr.csharp; + +/** + * The class is non-copyable, but is trivially movable, so the by-value operator injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsD`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsD extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsD(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsD::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsD_DefaultConstruct()`. + */ + public StaticOpsRhsD() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsD::StaticOpsRhsD`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsD_ConstructFromAnother()`. + */ + public StaticOpsRhsD(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsD _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java new file mode 100644 index 00000000..a9a4fce8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsE`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsE extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsE(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsE::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsE_DefaultConstruct()`. + */ + public StaticOpsRhsE() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsE::StaticOpsRhsE`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsE_ConstructFromAnother()`. + */ + public StaticOpsRhsE(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsE::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsE_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsE assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsE _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsE(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java new file mode 100644 index 00000000..b00f0824 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The class isn't copyable, but the operator takes it by const reference, so it injects fine. + * Generated from class `MR::CSharp::StaticOpsRhsF`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsF extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsF(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsF::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsF_DefaultConstruct()`. + */ + public StaticOpsRhsF() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsF::StaticOpsRhsF`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsF_ConstructFromAnother()`. + */ + public StaticOpsRhsF(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsF::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * The reference to this object might be preserved in the return value. + * + * Calls `MR_CSharp_StaticOpsRhsF_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsF assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsF _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsF(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java new file mode 100644 index 00000000..d7fd6a81 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, so an operator with a by-value parameter gets injected into the non-const half. + * Generated from class `MR::CSharp::StaticOpsRhsG`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsG extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsG(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsG::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsG_DefaultConstruct()`. + */ + public StaticOpsRhsG() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsG::StaticOpsRhsG`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsG_ConstructFromAnother()`. + */ + public StaticOpsRhsG(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsG::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsG_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsG assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsG _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsG(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java new file mode 100644 index 00000000..0279feb6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java @@ -0,0 +1,103 @@ +package mrbind_test.mr.csharp; + +/** + * The copy ctor uses a non-const reference, but it doesn't matter because the operator takes the parameter by const reference, + * so the operator gets injected into the const half. + * Generated from class `MR::CSharp::StaticOpsRhsH`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StaticOpsRhsH extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StaticOpsRhsH(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StaticOpsRhsH::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StaticOpsRhsH_DefaultConstruct()`. + */ + public StaticOpsRhsH() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StaticOpsRhsH::StaticOpsRhsH`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StaticOpsRhsH_ConstructFromAnother()`. + */ + public StaticOpsRhsH(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::StaticOpsRhsH::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StaticOpsRhsH_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StaticOpsRhsH assignFromAnother(mrbind_test.mr.csharp.StaticOpsRhsH _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StaticOpsRhsH(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java new file mode 100644 index 00000000..bd088d9b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvFsPath`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvFsPath extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvFsPath(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvFsPath::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvFsPath_DefaultConstruct()`. + */ + public StringConvFsPath() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvFsPath::StringConvFsPath`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvFsPath_ConstructFromAnother()`. + */ + public StringConvFsPath(mrbind_test.mr.csharp.StringConvFsPath _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvFsPath::operator std::filesystem::path`. + * + * Calls `MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path()`. + */ + public mrbind_test.mr.cs.std_filesystem_path convertTo_std_filesystem_path() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvFsPath::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvFsPath_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvFsPath assignFromAnother(mrbind_test.mr.csharp.StringConvFsPath _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvFsPath(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java new file mode 100644 index 00000000..59a73abb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.csharp; + +/** + * Conversions to string-like types. + * Those create the additional `operator string` to convert directly to a C# string, and `override string ToString()` to override the method of the implicit base `object`. + * Generated from class `MR::CSharp::StringConvString`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvString extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvString(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvString::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvString_DefaultConstruct()`. + */ + public StringConvString() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvString::StringConvString`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvString_ConstructFromAnother()`. + */ + public StringConvString(mrbind_test.mr.csharp.StringConvString _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::CSharp::StringConvString::operator std::string`. + * + * Calls `MR_CSharp_StringConvString_ConvertTo_std_string()`. + */ + public mrbind_test.mr.cs.std_string convertTo_std_string() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConvertTo_std_string.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvString::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvString_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvString assignFromAnother(mrbind_test.mr.csharp.StringConvString _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvString(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java new file mode 100644 index 00000000..3a3ed2f2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::StringConvStringView`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class StringConvStringView extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public StringConvStringView(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? StringConvStringView::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_StringConvStringView_DefaultConstruct()`. + */ + public StringConvStringView() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::StringConvStringView::StringConvStringView`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_StringConvStringView_ConstructFromAnother()`. + */ + public StringConvStringView(mrbind_test.mr.csharp.StringConvStringView _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Mark this `explicit` and `const` for a change. + * Generated from conversion operator `MR::CSharp::StringConvStringView::operator std::string_view`. + * + * Calls `MR_CSharp_StringConvStringView_ConvertTo_std_string_view()`. + */ + public mrbind_test.mr.cs.std_string_view convertTo_std_string_view() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConvertTo_std_string_view.invokeExact(rawPointer()); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::StringConvStringView::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_StringConvStringView_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.StringConvStringView assignFromAnother(mrbind_test.mr.csharp.StringConvStringView _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.StringConvStringView(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java new file mode 100644 index 00000000..0d4675cc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java @@ -0,0 +1,143 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestConstness`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestConstness extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestConstness(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestConstness::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestConstness_DefaultConstruct()`. + */ + public TestConstness() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestConstness::TestConstness`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestConstness_ConstructFromAnother()`. + */ + public TestConstness(mrbind_test.mr.csharp.TestConstness _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestConstness_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestConstness assignFromAnother(mrbind_test.mr.csharp.TestConstness _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestConstness(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo_mut()`. + */ + public void foo_mut() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo_mut.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestConstness::foo`. + * + * Calls `MR_CSharp_TestConstness_foo()`. + */ + public void foo() + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java new file mode 100644 index 00000000..2664ce9b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java @@ -0,0 +1,507 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestFields`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestFields extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestFields(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestFields::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestFields::TestFields`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFromAnother()`. + */ + public TestFields(mrbind_test.mr.csharp.TestFields _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestFields _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructs `MR::CSharp::TestFields` elementwise. + * The reference to the parameter `i_ref` might be preserved in the constructed object. + * The reference to the parameter `const_i_ref` might be preserved in the constructed object. + * The reference to the parameter `s` might be preserved in the constructed object. + * The reference to the parameter `const_s` might be preserved in the constructed object. + * The reference to the parameter `s_ref` might be preserved in the constructed object. + * The reference to the parameter `const_s_ref` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestFields_ConstructFrom()`. Some types are raw C types, see the C bindings for the details. + */ + public TestFields(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + this(__ctor_constructFrom(i, const_i, i_ref, const_i_ref, s, const_s, s_ref, const_s_ref), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int i, int const_i, java.lang.foreign.MemorySegment i_ref, int const_i_ref, java.lang.String s, java.lang.String const_s, mrbind_test.mr.cs.std_string s_ref, java.lang.String const_s_ref) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __str_const_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s, "const_s")); + java.lang.foreign.MemorySegment __str_const_s_ref = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s_ref, "const_s_ref")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFrom.invokeExact(i, const_i, i_ref, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, const_i_ref), __str_s, mrbind_test.Ffi.end(__str_s), __str_const_s, mrbind_test.Ffi.end(__str_const_s), mrbind_test.Ffi.ptrNonNull(s_ref, "s_ref"), __str_const_s_ref, mrbind_test.Ffi.end(__str_const_s_ref)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(s_ref); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_i()`. + */ + public static int static_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_i`. + * + * Calls `MR_CSharp_TestFields_Set_static_i()`. + */ + public static void setStatic_i(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i()`. + */ + public static int static_const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment static_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_i_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_i_ref()`. + */ + public static int static_const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_s()`. + */ + public static mrbind_test.mr.cs.std_string static_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `static_s`. + * The reference to the parameter `value` might be preserved in this object in element `static_s`. + * + * Calls `MR_CSharp_TestFields_Set_static_s()`. + */ + public static void setStatic_s(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `static_const_s_ref`. + * + * Calls `MR_CSharp_TestFields_Get_static_const_s_ref()`. + */ + public static mrbind_test.mr.cs.std_string static_const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * < Test same-line documentation comment. + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i()`. + */ + public int i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * < Test same-line documentation comment. + * Modifies a member variable of class `MR::CSharp::TestFields` named `i`. + * + * Calls `MR_CSharp_TestFields_Set_i()`. + */ + public void setI(int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i()`. + */ + public int const_i() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_i_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_i_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_i_ref()`. + */ + public int const_i_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestFields` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_CSharp_TestFields_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s()`. + */ + public mrbind_test.mr.cs.std_string const_s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_s_ref()`. + */ + public mrbind_test.mr.cs.std_string s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestFields` named `const_s_ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestFields_Get_const_s_ref()`. + */ + public mrbind_test.mr.cs.std_string const_s_ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java new file mode 100644 index 00000000..04b8f363 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java @@ -0,0 +1,852 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsA extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsA(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsA::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsA::TestOpsA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsA_ConstructFromAnother()`. + */ + public TestOpsA(mrbind_test.mr.csharp.TestOpsA _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsA_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsA _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsA()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsA()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsA()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsA()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsA()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsA()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsA()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsA()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsA()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsA()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsA()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsA()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsA()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsA()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator+=`. + * + * Calls `MR_CSharp_TestOpsA_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator-=`. + * + * Calls `MR_CSharp_TestOpsA_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator*=`. + * + * Calls `MR_CSharp_TestOpsA_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator/=`. + * + * Calls `MR_CSharp_TestOpsA_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator%=`. + * + * Calls `MR_CSharp_TestOpsA_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator^=`. + * + * Calls `MR_CSharp_TestOpsA_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&=`. + * + * Calls `MR_CSharp_TestOpsA_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator|=`. + * + * Calls `MR_CSharp_TestOpsA_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsA()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsA()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<<=`. + * + * Calls `MR_CSharp_TestOpsA_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator>>=`. + * + * Calls `MR_CSharp_TestOpsA_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsA()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsA()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsA()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsA()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->*`. + * + * Calls `MR_CSharp_TestOpsA_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator->`. + * + * Calls `MR_CSharp_TestOpsA_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator()`. + * + * Calls `MR_CSharp_TestOpsA_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsA::operator[]`. + * + * Calls `MR_CSharp_TestOpsA_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java new file mode 100644 index 00000000..72288f48 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java @@ -0,0 +1,852 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsB extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsB(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsB::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsB::TestOpsB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsB_ConstructFromAnother()`. + */ + public TestOpsB(mrbind_test.mr.csharp.TestOpsB _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsB_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsB()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsB()`. + */ + public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsB()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsB()`. + */ + public int opSub(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsB()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsB()`. + */ + public int opMul(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsB()`. + */ + public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsB()`. + */ + public int opMod(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsB()`. + */ + public int opXor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsB()`. + */ + public int opBitand() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsB()`. + */ + public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsB()`. + */ + public int opBitor(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsB()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsB()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator+=`. + * + * Calls `MR_CSharp_TestOpsB_add_assign()`. + */ + public int add_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator-=`. + * + * Calls `MR_CSharp_TestOpsB_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator*=`. + * + * Calls `MR_CSharp_TestOpsB_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator/=`. + * + * Calls `MR_CSharp_TestOpsB_div_assign()`. + */ + public int div_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator%=`. + * + * Calls `MR_CSharp_TestOpsB_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator^=`. + * + * Calls `MR_CSharp_TestOpsB_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&=`. + * + * Calls `MR_CSharp_TestOpsB_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator|=`. + * + * Calls `MR_CSharp_TestOpsB_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsB()`. + */ + public int opLshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsB()`. + */ + public int opRshift(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<<=`. + * + * Calls `MR_CSharp_TestOpsB_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator>>=`. + * + * Calls `MR_CSharp_TestOpsB_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsB()`. + */ + public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsB()`. + */ + public int opAnd(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsB()`. + */ + public int opOr(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsB()`. + */ + public int opComma(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->*`. + * + * Calls `MR_CSharp_TestOpsB_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator->`. + * + * Calls `MR_CSharp_TestOpsB_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator()`. + * + * Calls `MR_CSharp_TestOpsB_call()`. + */ + public int call(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsB::operator[]`. + * + * Calls `MR_CSharp_TestOpsB_index()`. + */ + public int index(mrbind_test.mr.csharp.TestOpsB _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java new file mode 100644 index 00000000..5cc3a9c3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java @@ -0,0 +1,841 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TestOpsC`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestOpsC extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestOpsC(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestOpsC::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::CSharp::TestOpsC::TestOpsC`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestOpsC_ConstructFromAnother()`. + */ + public TestOpsC(mrbind_test.mr.csharp.TestOpsC _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestOpsC_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestOpsC assignFromAnother(mrbind_test.mr.csharp.TestOpsC _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestOpsC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_pos_MR_CSharp_TestOpsC()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+`. + * + * Calls `MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAdd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_neg_MR_CSharp_TestOpsC()`. + */ + public void opSub() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-`. + * + * Calls `MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opSub(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_deref_MR_CSharp_TestOpsC()`. + */ + public void opMul() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*`. + * + * Calls `MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMul(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/`. + * + * Calls `MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opDiv(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%`. + * + * Calls `MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opMod(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^`. + * + * Calls `MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opXor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_addressof_MR_CSharp_TestOpsC()`. + */ + public void opBitand() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&`. + * + * Calls `MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitand(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|`. + * + * Calls `MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opBitor(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator~`. + * + * Calls `MR_C_compl_MR_CSharp_TestOpsC()`. + */ + public void opCompl() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator!`. + * + * Calls `MR_C_not_MR_CSharp_TestOpsC()`. + */ + public void opNot() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator=`. + * + * Calls `MR_CSharp_TestOpsC_assign()`. + */ + public void assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator+=`. + * + * Calls `MR_CSharp_TestOpsC_add_assign()`. + */ + public void add_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator-=`. + * + * Calls `MR_CSharp_TestOpsC_sub_assign()`. + */ + public void sub_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator*=`. + * + * Calls `MR_CSharp_TestOpsC_mul_assign()`. + */ + public void mul_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator/=`. + * + * Calls `MR_CSharp_TestOpsC_div_assign()`. + */ + public void div_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator%=`. + * + * Calls `MR_CSharp_TestOpsC_mod_assign()`. + */ + public void mod_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator^=`. + * + * Calls `MR_CSharp_TestOpsC_xor_assign()`. + */ + public void xor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&=`. + * + * Calls `MR_CSharp_TestOpsC_bitand_assign()`. + */ + public void bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator|=`. + * + * Calls `MR_CSharp_TestOpsC_bitor_assign()`. + */ + public void bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<`. + * + * Calls `MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opLshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>`. + * + * Calls `MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opRshift(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<<=`. + * + * Calls `MR_CSharp_TestOpsC_lshift_assign()`. + */ + public void lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator>>=`. + * + * Calls `MR_CSharp_TestOpsC_rshift_assign()`. + */ + public void rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator&&`. + * + * Calls `MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opAnd(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator||`. + * + * Calls `MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opOr(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator,`. + * + * Calls `MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA()`. + */ + public void opComma(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->*`. + * + * Calls `MR_CSharp_TestOpsC_arrow_star()`. + */ + public void arrow_star(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator->`. + * + * Calls `MR_CSharp_TestOpsC_arrow()`. + */ + public void arrow() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator()`. + * + * Calls `MR_CSharp_TestOpsC_call()`. + */ + public void call(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::CSharp::TestOpsC::operator[]`. + * + * Calls `MR_CSharp_TestOpsC_index()`. + */ + public void index(mrbind_test.mr.csharp.TestOpsA _1) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java new file mode 100644 index 00000000..a58339ab --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -0,0 +1,492 @@ +package mrbind_test.mr.csharp; + +/** + * Test `std::function`. + * Generated from class `MR::CSharp::TestStdFunction`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TestStdFunction extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TestStdFunction(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TestStdFunction::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TestStdFunction_DefaultConstruct()`. + */ + public TestStdFunction() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::CSharp::TestStdFunction` elementwise. + * The reference to the parameter `f1` might be preserved in the constructed object. + * The reference to the parameter `f2` might be preserved in the constructed object. + * The reference to the parameter `f3` might be preserved in the constructed object. + * The reference to the parameter `f4` might be preserved in the constructed object. + * The reference to the parameter `f5` might be preserved in the constructed object. + * The reference to the parameter `f6` might be preserved in the constructed object. + * The reference to the parameter `f7` might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFrom()`. + */ + public TestStdFunction(mrbind_test.mr.cs.std_function_int_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int_int f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5, mrbind_test.mr.cs.std_function_int_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + this(__ctor_constructFrom(f1, f2, f3, f4, f5, f6, f7), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.cs.std_function_int_from_std_string f1, mrbind_test.mr.cs.std_function_std_string_from_int_int f2, mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3, mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4, mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5, mrbind_test.mr.cs.std_function_int_rvalue_ref f6, mrbind_test.mr.cs.std_function_void f7) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFrom.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f1, "f1"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f2, "f2"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f3, "f3"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f4, "f4"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f5, "f5"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f6, "f6"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f7, "f7")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(f1); + java.lang.ref.Reference.reachabilityFence(f2); + java.lang.ref.Reference.reachabilityFence(f3); + java.lang.ref.Reference.reachabilityFence(f4); + java.lang.ref.Reference.reachabilityFence(f5); + java.lang.ref.Reference.reachabilityFence(f6); + java.lang.ref.Reference.reachabilityFence(f7); + } + } + + /** + * Generated from constructor `MR::CSharp::TestStdFunction::TestStdFunction`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TestStdFunction_ConstructFromAnother()`. + */ + public TestStdFunction(mrbind_test.mr.csharp.TestStdFunction _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TestStdFunction_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TestStdFunction assignFromAnother(mrbind_test.mr.csharp.TestStdFunction _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TestStdFunction(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TestStdFunction::Call`. + * + * Calls `MR_CSharp_TestStdFunction_Call()`. + */ + public void Call() + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Call.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f1()`. + */ + public mrbind_test.mr.cs.std_function_int_from_std_string f1() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f1`. + * The reference to the parameter `value` might be preserved in this object in element `f1`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f1()`. + */ + public void setF1(mrbind_test.mr.cs.std_function_int_from_std_string value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f2()`. + */ + public mrbind_test.mr.cs.std_function_std_string_from_int_int f2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f2`. + * The reference to the parameter `value` might be preserved in this object in element `f2`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f2()`. + */ + public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int_int value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f3()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f3`. + * The reference to the parameter `value` might be preserved in this object in element `f3`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f3()`. + */ + public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f4()`. + */ + public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC f4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f4`. + * The reference to the parameter `value` might be preserved in this object in element `f4`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f4()`. + */ + public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f5()`. + */ + public mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f5`. + * The reference to the parameter `value` might be preserved in this object in element `f5`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f5()`. + */ + public void setF5(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f6()`. + */ + public mrbind_test.mr.cs.std_function_int_rvalue_ref f6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f6`. + * The reference to the parameter `value` might be preserved in this object in element `f6`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f6()`. + */ + public void setF6(mrbind_test.mr.cs.std_function_int_rvalue_ref value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_CSharp_TestStdFunction_Get_f7()`. + */ + public mrbind_test.mr.cs.std_function_void f7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::CSharp::TestStdFunction` named `f7`. + * The reference to the parameter `value` might be preserved in this object in element `f7`. + * + * Calls `MR_CSharp_TestStdFunction_Set_f7()`. + */ + public void setF7(mrbind_test.mr.cs.std_function_void value) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java new file mode 100644 index 00000000..4d8aa3b6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::Trivial`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Trivial extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Trivial(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Trivial::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_Trivial_DefaultConstruct()`. + */ + public Trivial() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::Trivial::Trivial`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_Trivial_ConstructFromAnother()`. + */ + public Trivial(mrbind_test.mr.csharp.Trivial _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::Trivial::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_Trivial_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Trivial _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java new file mode 100644 index 00000000..15667fd0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.csharp; + +/** + * Generated from class `MR::CSharp::TrivialDerived`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class TrivialDerived extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public TrivialDerived(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? TrivialDerived::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CSharp_TrivialDerived_DefaultConstruct()`. + */ + public TrivialDerived() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CSharp::TrivialDerived::TrivialDerived`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CSharp_TrivialDerived_ConstructFromAnother()`. + */ + public TrivialDerived(mrbind_test.mr.csharp.TrivialDerived _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CSharp::TrivialDerived::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CSharp_TrivialDerived_AssignFromAnother()`. + */ + public mrbind_test.mr.csharp.TrivialDerived assignFromAnother(mrbind_test.mr.csharp.TrivialDerived _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.csharp.TrivialDerived(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java new file mode 100644 index 00000000..af4d7b2a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Af`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Af extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Af(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Af::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Af_DefaultConstruct()`. + */ + public Af() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Af::Af`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Af_ConstructFromAnother()`. + */ + public Af(mrbind_test.mr.customprefnames.Af _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Af::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Af_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Af assignFromAnother(mrbind_test.mr.customprefnames.Af _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Af(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java new file mode 100644 index 00000000..b278ab52 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.customprefnames; + +/** + * Generated from class `MR::CustomPrefNames::Ai`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Ai extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Ai(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Ai::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_CustomPrefNames_Ai_DefaultConstruct()`. + */ + public Ai() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::CustomPrefNames::Ai::Ai`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_CustomPrefNames_Ai_ConstructFromAnother()`. + */ + public Ai(mrbind_test.mr.customprefnames.Ai _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::CustomPrefNames::Ai::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_CustomPrefNames_Ai_AssignFromAnother()`. + */ + public mrbind_test.mr.customprefnames.Ai assignFromAnother(mrbind_test.mr.customprefnames.Ai _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.customprefnames.Ai(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java new file mode 100644 index 00000000..51b63a01 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.customprefnames; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::CustomPrefNames::blah`. + * + * Calls `MR_CustomPrefNames_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java new file mode 100644 index 00000000..590b87e3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java @@ -0,0 +1,75 @@ +package mrbind_test.mr.declorder; + +/** + * Here all classes are whitelisted using `--expose-as-struct`. + * Generated from class `MR::DeclOrder::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"blah"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_blah = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("blah")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int blah() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah);} + public void setBlah(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_blah, value);} + + /** + * Generated from method `MR::DeclOrder::A::c`. + * + * Calls `MR_DeclOrder_A_c()`. + */ + public mrbind_test.mr.declorder.A_B c() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_c.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.A_B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::d`. + * + * Calls `MR_DeclOrder_A_d()`. + */ + public mrbind_test.mr.declorder.A_E d() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_d.invokeExact(rawPointer()); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java new file mode 100644 index 00000000..aedf4a22 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java @@ -0,0 +1,74 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::A::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::A::B");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A_B copy() {return new A_B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A_B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::A::B::a`. + * + * Calls `MR_DeclOrder_A_B_a()`. + */ + public mrbind_test.mr.declorder.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_a.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.A(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::DeclOrder::A::B::b`. + * + * Calls `MR_DeclOrder_A_B_b()`. + */ + public mrbind_test.mr.declorder.A_E b() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_b.invokeExact(rawPointer()); + return mrbind_test.mr.declorder.A_E.of(__ret); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public A_B() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_E.java new file mode 100644 index 00000000..c54b9f17 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.declorder; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java new file mode 100644 index 00000000..332fe584 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_false extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_false(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_false copy() {return new C_false(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_false other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_false_blah()`. + */ + public mrbind_test.mr.declorder.C_true blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_false_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.C_true(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_false() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java new file mode 100644 index 00000000..32f17bea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.declorder; + +/** + * Generated from class `MR::DeclOrder::C`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C_true extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"bleh"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT}); + public static final long OFF_bleh = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("bleh")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 4, 4, "MR::DeclOrder::C");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C_true(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public C_true copy() {return new C_true(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(C_true other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public int bleh() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh);} + public void setBleh(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_bleh, value);} + + /** + * Generated from method `MR::DeclOrder::C::blah`. + * + * Calls `MR_DeclOrder_C_true_blah()`. + */ + public mrbind_test.mr.declorder.C_false blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_true_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + return new mrbind_test.mr.declorder.C_false(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Zero-initialized. */ + public C_true() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java new file mode 100644 index 00000000..a3e23774 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java @@ -0,0 +1,44 @@ +package mrbind_test.mr.deprecation; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Deprecation::foo`. + * + * Calls `MR_Deprecation_foo()`. + */ + @java.lang.Deprecated + public static void foo() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_foo.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Deprecation::bar`. + * + * Calls `MR_Deprecation_bar()`. + */ + @java.lang.Deprecated + public static void bar() + { + try + { + mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_bar.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java new file mode 100644 index 00000000..5c898331 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * Generated from class `MR::IncludesForEnumConstants::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_MR_IncludesForEnumConstants_E_e1 extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_MR_IncludesForEnumConstants_E_e1(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_MR_IncludesForEnumConstants_E_e1::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct()`. + */ + public A_MR_IncludesForEnumConstants_E_e1() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IncludesForEnumConstants::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother()`. + */ + public A_MR_IncludesForEnumConstants_E_e1(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IncludesForEnumConstants::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother()`. + */ + public mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 assignFromAnother(mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/E.java new file mode 100644 index 00000000..e3953a57 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.includesforenumconstants; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java new file mode 100644 index 00000000..c06e887e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.includesforenumconstants; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Make sure that the `.cpp` implementation file includes the header for `E` correctly. + * Generated from function `MR::IncludesForEnumConstants::foo`. + * + * Calls `MR_IncludesForEnumConstants_foo()`. + */ + public static mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1 foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants.H0.MR_IncludesForEnumConstants_foo.invokeExact(); + return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/E.java new file mode 100644 index 00000000..aaf1a2cd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/E.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** + * Can't use an opaque struct as an array element, because, well, it's opaque. But a enum should work. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java new file mode 100644 index 00000000..64159806 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -0,0 +1,42 @@ +package mrbind_test.mr.incompletearrayelemtype; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IncompleteArrayElemType::bar`. + * + * Calls `MR_IncompleteArrayElemType_bar()`. Some types are raw C types, see the C bindings for the details. + */ + public static void bar(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types_2.H0.MR_IncompleteArrayElemType_bar.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::IncompleteArrayElemType::foo`. + * + * Calls `MR_IncompleteArrayElemType_foo()`. Some types are raw C types, see the C bindings for the details. + */ + public static void foo(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_arrays_of_incomplete_types.H0.MR_IncompleteArrayElemType_foo.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java new file mode 100644 index 00000000..f2202f59 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.iostream; + +/** + * Generated from class `MR::IOStream::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_IOStream_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::IOStream::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_IOStream_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.iostream.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::IOStream::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_IOStream_A_AssignFromAnother()`. + */ + public mrbind_test.mr.iostream.A assignFromAnother(mrbind_test.mr.iostream.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.iostream.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java new file mode 100644 index 00000000..5e65e057 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java @@ -0,0 +1,52 @@ +package mrbind_test.mr.iostream; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::IOStream::operator<<`. + * + * Calls `MR_C_print_MR_IOStream_A()`. + */ + public static void opLshift(mrbind_test.mr.cs.std_ostream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_print_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::IOStream::operator>>`. + * + * Calls `MR_C_input_MR_IOStream_A()`. + */ + public static void opRshift(mrbind_test.mr.cs.std_istream _1, mrbind_test.mr.iostream.A _2) + { + try + { + mrbind_test.ffi.MR.test_iostream.H0.MR_C_input_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java new file mode 100644 index 00000000..d497c81e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java @@ -0,0 +1,212 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::A` elementwise. + * + * Calls `MR_LifetimeInference_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.lifetimeinference.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_A_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.A assignFromAnother(mrbind_test.mr.lifetimeinference.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::begin`. + * + * Calls `MR_LifetimeInference_A_begin()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_begin.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::LifetimeInference::A::end`. + * + * Calls `MR_LifetimeInference_A_end()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_end.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::A` named `x`. + * + * Calls `MR_LifetimeInference_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java new file mode 100644 index 00000000..3ebd2015 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java @@ -0,0 +1,168 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_LifetimeInference_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::LifetimeInference::B` elementwise. + * + * Calls `MR_LifetimeInference_B_ConstructFrom()`. + */ + public B(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.lifetimeinference.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::LifetimeInference::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_B_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.B assignFromAnother(mrbind_test.mr.lifetimeinference.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::LifetimeInference::B` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_LifetimeInference_B_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::LifetimeInference::B` named `x`. + * + * Calls `MR_LifetimeInference_B_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java new file mode 100644 index 00000000..bc33fc14 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java @@ -0,0 +1,105 @@ +package mrbind_test.mr.lifetimeinference; + +/** + * Generated from class `MR::LifetimeInference::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_LifetimeInference_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.lifetimeinference.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::LifetimeInference::C::C`. + * + * Calls `MR_LifetimeInference_C_Construct()`. Some types are raw C types, see the C bindings for the details. + */ + public C(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + this(__ctor_construct(_1, _2, _3), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.lifetimeinference.A _1, java.lang.foreign.MemorySegment _2, int _3) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2, _3); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::LifetimeInference::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_LifetimeInference_C_AssignFromAnother()`. + */ + public mrbind_test.mr.lifetimeinference.C assignFromAnother(mrbind_test.mr.lifetimeinference.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.lifetimeinference.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java new file mode 100644 index 00000000..f0976074 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -0,0 +1,96 @@ +package mrbind_test.mr.lifetimeinference; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::LifetimeInference::begin`. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_A()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.A a) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(a); + } + } + + /** + * Generated from function `MR::LifetimeInference::begin`. + * + * Calls `MR_LifetimeInference_begin_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from function `MR::LifetimeInference::end`. + * + * Calls `MR_LifetimeInference_end_MR_LifetimeInference_B()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinference.B b) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java new file mode 100644 index 00000000..de140376 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java @@ -0,0 +1,96 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::A`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"a", "b", "c", "ll", "arr", "arr2d"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_SHORT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.JAVA_LONG, java.lang.foreign.MemoryLayout.sequenceLayout(3, java.lang.foreign.ValueLayout.JAVA_INT), java.lang.foreign.MemoryLayout.sequenceLayout(4, java.lang.foreign.MemoryLayout.sequenceLayout(5, java.lang.foreign.ValueLayout.JAVA_INT))}); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_b = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("b")); + public static final long OFF_c = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("c")); + public static final long OFF_ll = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("ll")); + public static final long OFF_arr = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr")); + public static final long OFF_arr2d = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("arr2d")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 120, 8, "MR::MatchingLayout::A");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public A copy() {return new A(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(A other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + /** + * first + */ + public int a() {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a);} + public void setA(int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_a, value);} + + /** + * second + */ + public short b() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b);} + public void setB(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_b, value);} + + /** + * third + */ + public float c() {return segment.get(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c);} + public void setC(float value) {segment.set(java.lang.foreign.ValueLayout.JAVA_FLOAT, OFF_c, value);} + + public long ll() {return segment.get(java.lang.foreign.ValueLayout.JAVA_LONG, OFF_ll);} + public void setLl(long value) {segment.set(java.lang.foreign.ValueLayout.JAVA_LONG, OFF_ll, value);} + + public int arr(int i0) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4);} + public void setArr(int i0, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr + (java.util.Objects.checkIndex(i0, 3)) * 4, value);} + + public int arr2d(int i0, int i1) {return segment.get(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4);} + public void setArr2d(int i0, int i1, int value) {segment.set(java.lang.foreign.ValueLayout.JAVA_INT, OFF_arr2d + ((java.util.Objects.checkIndex(i0, 4)) * 5 + java.util.Objects.checkIndex(i1, 5)) * 4, value);} + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Returns a pointer to a member variable of class `MR::MatchingLayout::A` named `x`. + * + * Calls `MR_MatchingLayout_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Having static fields is not an error! Those get their normal getters and setters. + * Modifies a member variable of class `MR::MatchingLayout::A` named `x`. + * + * Calls `MR_MatchingLayout_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Zero-initialized. */ + public A() {super(mrbind_test.Ffi.allocStruct(LAYOUT), null);} +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java new file mode 100644 index 00000000..984fe8fe --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java @@ -0,0 +1,58 @@ +package mrbind_test.mr.matchinglayout; + +/** + * Generated from class `MR::MatchingLayout::B`. + * + * Has the same layout as the C++ struct, the fields are accessed in place in native memory. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppStruct +{ + /** The native layout of the struct. */ + public static final java.lang.foreign.StructLayout LAYOUT = mrbind_test.Ffi.structLayout(new java.lang.String[]{"x", "a", "y"}, new java.lang.foreign.MemoryLayout[]{java.lang.foreign.ValueLayout.JAVA_SHORT, mrbind_test.mr.matchinglayout.A.LAYOUT, java.lang.foreign.ValueLayout.JAVA_BYTE}); + public static final long OFF_x = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("x")); + public static final long OFF_a = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("a")); + public static final long OFF_y = LAYOUT.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("y")); + static {mrbind_test.Ffi.checkLayout(LAYOUT, 136, 8, "MR::MatchingLayout::B");} + + /** Wraps a segment holding the struct. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment segment, java.lang.Object owner) {super(segment, owner);} + + /** A copy of the struct, in its own memory. */ + public B copy() {return new B(mrbind_test.Ffi.allocStruct(LAYOUT).copyFrom(segment), null);} + + /** Overwrites the contents with those of another struct. */ + public void set(B other) {segment.copyFrom(mrbind_test.Ffi.ptrNonNull(other, "other"));} + + public short x() {return segment.get(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x);} + public void setX(short value) {segment.set(java.lang.foreign.ValueLayout.JAVA_SHORT, OFF_x, value);} + + public mrbind_test.mr.matchinglayout.A a() {return new mrbind_test.mr.matchinglayout.A(segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()), this);} + public void setA(mrbind_test.mr.matchinglayout.A value) {segment.asSlice(OFF_a, mrbind_test.mr.matchinglayout.A.LAYOUT.byteSize()).copyFrom(mrbind_test.Ffi.ptrNonNull(value, "value"));} + + public byte y() {return segment.get(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y);} + public void setY(byte value) {segment.set(java.lang.foreign.ValueLayout.JAVA_BYTE, OFF_y, value);} + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_MatchingLayout_B_DefaultConstruct()`. + */ + public B() + { + super(__ctor_defaultConstruct(), null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_B_DefaultConstruct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java new file mode 100644 index 00000000..2f538576 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java @@ -0,0 +1,91 @@ +package mrbind_test.mr.matchinglayout; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::MatchingLayout::foo`. + * + * Calls `MR_MatchingLayout_foo()`. + */ + public static mrbind_test.mr.matchinglayout.B foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_foo.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.matchinglayout.B(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::MatchingLayout::bar`. + * + * Calls `MR_MatchingLayout_bar()`. + */ + public static void bar(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::baz`. + * + * Calls `MR_MatchingLayout_baz()`. + */ + public static void baz(mrbind_test.mr.matchinglayout.B _1) + { + try + { + mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_baz.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::MatchingLayout::bleh`. + * + * Calls `MR_MatchingLayout_bleh()`. + */ + public static mrbind_test.mr.matchinglayout.B bleh(mrbind_test.mr.matchinglayout.B _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bleh.invokeExact(mrbind_test.Ffi.ptr(_1)); + java.lang.Object __owner = _1; + return __ret.address() == 0 ? null : new mrbind_test.mr.matchinglayout.B(__ret.reinterpret(mrbind_test.mr.matchinglayout.B.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java new file mode 100644 index 00000000..1036f3e3 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java @@ -0,0 +1,239 @@ +package mrbind_test.mr.membervars; + +/** + * Generated from class `MR::MemberVars::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::MemberVars::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_MemberVars_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.membervars.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.membervars.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `z`. + * + * Calls `MR_MemberVars_A_Get_z()`. + */ + public static int z() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `z`. + * + * Calls `MR_MemberVars_A_Set_z()`. + */ + public static void setZ(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `w`. + * + * Calls `MR_MemberVars_A_Get_w()`. + */ + public static int w() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::MemberVars::A` named `x`. + * + * Calls `MR_MemberVars_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `y`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_y()`. + */ + public int y() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Those don't get setters, and also get only one (non-const-propagating) getter. + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `ref`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Arrays don't get setters, because they aren't assignable. But they still get mutable getters + * Returns a pointer to a member variable of class `MR::MemberVars::A` named `arr`. This is a pointer to the first element of an array. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_MemberVars_A_Get_arr()`. + */ + public int arr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the size of the array member of class `MR::MemberVars::A` named `arr`. The size is `4`. + * + * Calls `MR_MemberVars_A_GetSize_arr()`. + */ + public static long arrSize() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java new file mode 100644 index 00000000..93722de0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * Generated from class `MR::NestedTemplateInst::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java new file mode 100644 index 00000000..2afd2821 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.nestedtemplateinst; + +/** + * This struct needs special care to be instantiated, even with the typedef below. Hmm. + * Generated from class `MR::NestedTemplateInst::A::AA`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int_AA_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int_AA_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int_AA_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct()`. + */ + public A_int_AA_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTemplateInst::A::AA::AA`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother()`. + */ + public A_int_AA_float(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTemplateInst::A::AA::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtemplateinst.A_int_AA_float assignFromAnother(mrbind_test.mr.nestedtemplateinst.A_int_AA_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtemplateinst.A_int_AA_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java new file mode 100644 index 00000000..ed188cce --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java @@ -0,0 +1,222 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::NestedTypes::A` elementwise. + * The reference to the parameter `b` might be preserved in the constructed object. + * The reference to the parameter `e` might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFrom()`. + */ + public A(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + this(__ctor_constructFrom(b, e), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test.mr.nestedtypes.A_B b, mrbind_test.mr.nestedtypes.A_E e) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b"), java.util.Objects.requireNonNull(e, "e").value); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(b); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.nestedtypes.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A assignFromAnother(mrbind_test.mr.nestedtypes.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_b()`. + */ + public mrbind_test.mr.nestedtypes.A_B b() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `b`. + * The reference to the parameter `value` might be preserved in this object in element `b`. + * + * Calls `MR_NestedTypes_A_Set_b()`. + */ + public void setB(mrbind_test.mr.nestedtypes.A_B value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } + + /** + * Returns a pointer to a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_NestedTypes_A_Get_e()`. + */ + public mrbind_test.mr.nestedtypes.A_E e() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::NestedTypes::A` named `e`. + * The reference to the parameter `value` might be preserved in this object in element `e`. + * + * Calls `MR_NestedTypes_A_Set_e()`. + */ + public void setE(mrbind_test.mr.nestedtypes.A_E value) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java new file mode 100644 index 00000000..0daf7010 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.nestedtypes; + +/** + * Generated from class `MR::NestedTypes::A::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_NestedTypes_A_B_DefaultConstruct()`. + */ + public A_B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::NestedTypes::A::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_NestedTypes_A_B_ConstructFromAnother()`. + */ + public A_B(mrbind_test.mr.nestedtypes.A_B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::NestedTypes::A::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_NestedTypes_A_B_AssignFromAnother()`. + */ + public mrbind_test.mr.nestedtypes.A_B assignFromAnother(mrbind_test.mr.nestedtypes.A_B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_E.java new file mode 100644 index 00000000..ba6e21dc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.nestedtypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java new file mode 100644 index 00000000..0e2c9e45 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_float_DefaultConstruct()`. + */ + public A_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_ConstructFromAnother()`. + */ + public A_float(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_float_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_float assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java new file mode 100644 index 00000000..e592d5df --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** + * Here the generated code will omit the template arguments for operators (to avoid unwanted instantiations), + * and omit qualifiers for friend functions (since they are normally only accessible via ADL). + * Generated from class `MR::OmittingTargsAndQuals::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OmittingTargsAndQuals_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OmittingTargsAndQuals::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OmittingTargsAndQuals_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OmittingTargsAndQuals_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.omittingtargsandquals.A_int assignFromAnother(mrbind_test.mr.omittingtargsandquals.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.omittingtargsandquals.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator+`. + * + * Calls `MR_C_pos_MR_OmittingTargsAndQuals_A_int()`. + */ + public void opAdd() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_int.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OmittingTargsAndQuals::A::operator-`. + * + * Calls `MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float()`. + */ + public void opSub(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java new file mode 100644 index 00000000..d41b8b18 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.omittingtargsandquals; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::b`. + * + * Calls `MR_OmittingTargsAndQuals_b()`. + */ + public static void b(mrbind_test.mr.omittingtargsandquals.A_int _1, mrbind_test.mr.omittingtargsandquals.A_float _2) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_b.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::a`. + * + * Calls `MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float()`. + */ + public static void a(mrbind_test.mr.omittingtargsandquals.A_float _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator*`. + * + * Calls `MR_C_deref_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void opMul(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_deref_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::operator~`. + * + * Calls `MR_C_compl_MR_OmittingTargsAndQuals_A_int()`. + */ + public static void opCompl(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_compl_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::c`. + * + * Calls `MR_OmittingTargsAndQuals_c()`. + */ + public static void c(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_c.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::d`. + * + * Calls `MR_OmittingTargsAndQuals_d()`. + */ + public static void d(mrbind_test.mr.omittingtargsandquals.A_int _1) + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_d.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OmittingTargsAndQuals::inst`. + * + * Calls `MR_OmittingTargsAndQuals_inst()`. + */ + public static void inst() + { + try + { + mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_inst.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java new file mode 100644 index 00000000..5ca2cb80 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java @@ -0,0 +1,1102 @@ +package mrbind_test.mr.overloadedops; + +/** + * Member functions. + * Generated from class `MR::OverloadedOps::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Since we have a custom assignment, we also need a custom copy ctor to avoid the deprecation warning. + * Generated from constructor `MR::OverloadedOps::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.overloadedops.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Assign. + * Generated from method `MR::OverloadedOps::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_A_AssignFromAnother()`. + */ + public int assignFromAnother(mrbind_test.mr.overloadedops.A _other) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Unary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_A()`. + */ + public int opAdd() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary plus. + * Generated from method `MR::OverloadedOps::A::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_A()`. + */ + public int opAdd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Unary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_A()`. + */ + public int opSub() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Binary minus. + * Generated from method `MR::OverloadedOps::A::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_A()`. + */ + public int opSub(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Dereference (unary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_A()`. + */ + public int opMul() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Multiply (binary star). + * Generated from method `MR::OverloadedOps::A::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_A()`. + */ + public int opMul(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide. + * Generated from method `MR::OverloadedOps::A::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_A()`. + */ + public int opDiv(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo. + * Generated from method `MR::OverloadedOps::A::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_A()`. + */ + public int opMod(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor. + * Generated from method `MR::OverloadedOps::A::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_A()`. + */ + public int opXor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and. + * Generated from method `MR::OverloadedOps::A::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_A()`. + */ + public int opBitand(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or. + * Generated from method `MR::OverloadedOps::A::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_A()`. + */ + public int opBitor(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit negate. + * Generated from method `MR::OverloadedOps::A::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_A()`. + */ + public int opCompl() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Boolean negate. + * Generated from method `MR::OverloadedOps::A::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_A()`. + */ + public int opNot() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Less. + * Generated from method `MR::OverloadedOps::A::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_A()`. + */ + public int opLess(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater. + * Generated from method `MR::OverloadedOps::A::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_A()`. + */ + public int opGreater(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Plus assign. + * Generated from method `MR::OverloadedOps::A::operator+=`. + * + * Calls `MR_OverloadedOps_A_add_assign()`. + */ + public int add_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Minus assign. + * Generated from method `MR::OverloadedOps::A::operator-=`. + * + * Calls `MR_OverloadedOps_A_sub_assign()`. + */ + public int sub_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply assign. + * Generated from method `MR::OverloadedOps::A::operator*=`. + * + * Calls `MR_OverloadedOps_A_mul_assign()`. + */ + public int mul_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Divide assign. + * Generated from method `MR::OverloadedOps::A::operator/=`. + * + * Calls `MR_OverloadedOps_A_div_assign()`. + */ + public int div_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Modulo assign. + * Generated from method `MR::OverloadedOps::A::operator%=`. + * + * Calls `MR_OverloadedOps_A_mod_assign()`. + */ + public int mod_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit xor assign. + * Generated from method `MR::OverloadedOps::A::operator^=`. + * + * Calls `MR_OverloadedOps_A_xor_assign()`. + */ + public int xor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit and assign. + * Generated from method `MR::OverloadedOps::A::operator&=`. + * + * Calls `MR_OverloadedOps_A_bitand_assign()`. + */ + public int bitand_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Bit or assign. + * Generated from method `MR::OverloadedOps::A::operator|=`. + * + * Calls `MR_OverloadedOps_A_bitor_assign()`. + */ + public int bitor_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift. + * Generated from method `MR::OverloadedOps::A::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_A()`. + */ + public int opLshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift. + * Generated from method `MR::OverloadedOps::A::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_A()`. + */ + public int opRshift(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Left shift assign. + * Generated from method `MR::OverloadedOps::A::operator<<=`. + * + * Calls `MR_OverloadedOps_A_lshift_assign()`. + */ + public int lshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Right shift assign. + * Generated from method `MR::OverloadedOps::A::operator>>=`. + * + * Calls `MR_OverloadedOps_A_rshift_assign()`. + */ + public int rshift_assign(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Equal. + * Generated from method `MR::OverloadedOps::A::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_A()`. + */ + public int opEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Not equal. + * Generated from method `MR::OverloadedOps::A::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_A()`. + */ + public int opNotEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Less equal. + * Generated from method `MR::OverloadedOps::A::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_A()`. + */ + public int opLessEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Greater equal. + * Generated from method `MR::OverloadedOps::A::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_A()`. + */ + public int opGreaterEqual(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Compare three way. + * Generated from method `MR::OverloadedOps::A::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_A()`. + */ + public int opCompareThreeWay(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * And. + * Generated from method `MR::OverloadedOps::A::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_A()`. + */ + public int opAnd(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Or. + * Generated from method `MR::OverloadedOps::A::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_A()`. + */ + public int opOr(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_A()`. + */ + public int opIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-increment. + * Generated from method `MR::OverloadedOps::A::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_A()`. + */ + public int opPostIncr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Pre-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_A()`. + */ + public int opDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Post-decrement. + * Generated from method `MR::OverloadedOps::A::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_A()`. + */ + public int opPostDecr() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Comma. + * Generated from method `MR::OverloadedOps::A::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_A()`. + */ + public int opComma(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow star. + * Generated from method `MR::OverloadedOps::A::operator->*`. + * + * Calls `MR_OverloadedOps_A_arrow_star()`. + */ + public int arrow_star(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Arrow. + * Generated from method `MR::OverloadedOps::A::operator->`. + * + * Calls `MR_OverloadedOps_A_arrow()`. + */ + public int arrow() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Function call. + * Generated from method `MR::OverloadedOps::A::operator()`. + * + * Calls `MR_OverloadedOps_A_call()`. + */ + public int call(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Indexing. + * Generated from method `MR::OverloadedOps::A::operator[]`. + * + * Calls `MR_OverloadedOps_A_index()`. + */ + public int index(mrbind_test.mr.overloadedops.A _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java new file mode 100644 index 00000000..9bc5b847 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.overloadedops; + +/** + * Free functions. + * Generated from class `MR::OverloadedOps::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.overloadedops.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_B_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.B assignFromAnother(mrbind_test.mr.overloadedops.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java new file mode 100644 index 00000000..ef8a98ab --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.overloadedops; + +/** + * Test how the names are generated. + * Generated from class `MR::OverloadedOps::C`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class C extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public C(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? C::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_C_DefaultConstruct()`. + */ + public C() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::C::C`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_C_ConstructFromAnother()`. + */ + public C(mrbind_test.mr.overloadedops.C _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::C::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_C_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.C assignFromAnother(mrbind_test.mr.overloadedops.C _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.C(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java new file mode 100644 index 00000000..f03dcf60 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java @@ -0,0 +1,146 @@ +package mrbind_test.mr.overloadedops; + +/** + * Generated from class `MR::OverloadedOps::D`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class D extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public D(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? D::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_OverloadedOps_D_DefaultConstruct()`. + */ + public D() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::OverloadedOps::D::D`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_OverloadedOps_D_ConstructFromAnother()`. + */ + public D(mrbind_test.mr.overloadedops.D _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_OverloadedOps_D_AssignFromAnother()`. + */ + public mrbind_test.mr.overloadedops.D assignFromAnother(mrbind_test.mr.overloadedops.D _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.overloadedops.D(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Disambiguating the names. + * Generated from method `MR::OverloadedOps::D::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::OverloadedOps::D::operator*`. + * + * Calls `MR_C_deref_const_MR_OverloadedOps_D_ref()`. + */ + public int opDeref_const_ref() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_const_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java new file mode 100644 index 00000000..2cdd3df4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java @@ -0,0 +1,1051 @@ +package mrbind_test.mr.overloadedops; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Unary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary plus. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_B()`. + */ + public static int opAdd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Unary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_neg_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Binary minus. + * Generated from function `MR::OverloadedOps::operator-`. + * + * Calls `MR_C_sub_MR_OverloadedOps_B()`. + */ + public static int opSub(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Dereference (unary star). + * Generated from function `MR::OverloadedOps::operator*`. + * + * Calls `MR_C_deref_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Multiply (binary star). + * Generated from function `MR::OverloadedOps::operator*`. + * + * Calls `MR_C_mul_MR_OverloadedOps_B()`. + */ + public static int opMul(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide. + * Generated from function `MR::OverloadedOps::operator/`. + * + * Calls `MR_C_div_MR_OverloadedOps_B()`. + */ + public static int opDiv(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo. + * Generated from function `MR::OverloadedOps::operator%`. + * + * Calls `MR_C_mod_MR_OverloadedOps_B()`. + */ + public static int opMod(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor. + * Generated from function `MR::OverloadedOps::operator^`. + * + * Calls `MR_C_xor_MR_OverloadedOps_B()`. + */ + public static int opXor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and. + * Generated from function `MR::OverloadedOps::operator&`. + * + * Calls `MR_C_bitand_MR_OverloadedOps_B()`. + */ + public static int opBitand(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or. + * Generated from function `MR::OverloadedOps::operator|`. + * + * Calls `MR_C_bitor_MR_OverloadedOps_B()`. + */ + public static int opBitor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit negate. + * Generated from function `MR::OverloadedOps::operator~`. + * + * Calls `MR_C_compl_MR_OverloadedOps_B()`. + */ + public static int opCompl(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Boolean negate. + * Generated from function `MR::OverloadedOps::operator!`. + * + * Calls `MR_C_not_MR_OverloadedOps_B()`. + */ + public static int opNot(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Assign. + * friend int operator=(B, B); // Can't be a free function. + * Less. + * Generated from function `MR::OverloadedOps::operator<`. + * + * Calls `MR_C_less_MR_OverloadedOps_B()`. + */ + public static int opLess(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater. + * Generated from function `MR::OverloadedOps::operator>`. + * + * Calls `MR_C_greater_MR_OverloadedOps_B()`. + */ + public static int opGreater(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Plus assign. + * Generated from function `MR::OverloadedOps::operator+=`. + * + * Calls `MR_C_add_assign_MR_OverloadedOps_B()`. + */ + public static int opAddAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Minus assign. + * Generated from function `MR::OverloadedOps::operator-=`. + * + * Calls `MR_C_sub_assign_MR_OverloadedOps_B()`. + */ + public static int opSubAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Multiply assign. + * Generated from function `MR::OverloadedOps::operator*=`. + * + * Calls `MR_C_mul_assign_MR_OverloadedOps_B()`. + */ + public static int opMulAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Divide assign. + * Generated from function `MR::OverloadedOps::operator/=`. + * + * Calls `MR_C_div_assign_MR_OverloadedOps_B()`. + */ + public static int opDivAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Modulo assign. + * Generated from function `MR::OverloadedOps::operator%=`. + * + * Calls `MR_C_mod_assign_MR_OverloadedOps_B()`. + */ + public static int opModAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit xor assign. + * Generated from function `MR::OverloadedOps::operator^=`. + * + * Calls `MR_C_xor_assign_MR_OverloadedOps_B()`. + */ + public static int opXorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit and assign. + * Generated from function `MR::OverloadedOps::operator&=`. + * + * Calls `MR_C_bitand_assign_MR_OverloadedOps_B()`. + */ + public static int opBitandAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Bit or assign. + * Generated from function `MR::OverloadedOps::operator|=`. + * + * Calls `MR_C_bitor_assign_MR_OverloadedOps_B()`. + */ + public static int opBitorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift. + * Generated from function `MR::OverloadedOps::operator<<`. + * + * Calls `MR_C_lshift_MR_OverloadedOps_B()`. + */ + public static int opLshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift. + * Generated from function `MR::OverloadedOps::operator>>`. + * + * Calls `MR_C_rshift_MR_OverloadedOps_B()`. + */ + public static int opRshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Left shift assign. + * Generated from function `MR::OverloadedOps::operator<<=`. + * + * Calls `MR_C_lshift_assign_MR_OverloadedOps_B()`. + */ + public static int opLshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Right shift assign. + * Generated from function `MR::OverloadedOps::operator>>=`. + * + * Calls `MR_C_rshift_assign_MR_OverloadedOps_B()`. + */ + public static int opRshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Equal. + * Generated from function `MR::OverloadedOps::operator==`. + * + * Calls `MR_C_equal_MR_OverloadedOps_B()`. + */ + public static int opEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Not equal. + * Generated from function `MR::OverloadedOps::operator!=`. + * + * Calls `MR_C_not_equal_MR_OverloadedOps_B()`. + */ + public static int opNotEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Less equal. + * Generated from function `MR::OverloadedOps::operator<=`. + * + * Calls `MR_C_less_equal_MR_OverloadedOps_B()`. + */ + public static int opLessEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Greater equal. + * Generated from function `MR::OverloadedOps::operator>=`. + * + * Calls `MR_C_greater_equal_MR_OverloadedOps_B()`. + */ + public static int opGreaterEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Compare three way. + * Generated from function `MR::OverloadedOps::operator<=>`. + * + * Calls `MR_C_compare_three_way_MR_OverloadedOps_B()`. + */ + public static int opCompareThreeWay(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * And. + * Generated from function `MR::OverloadedOps::operator&&`. + * + * Calls `MR_C_and_MR_OverloadedOps_B()`. + */ + public static int opAnd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Or. + * Generated from function `MR::OverloadedOps::operator||`. + * + * Calls `MR_C_or_MR_OverloadedOps_B()`. + */ + public static int opOr(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Pre-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_incr_MR_OverloadedOps_B()`. + */ + public static int opIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-increment. + * Generated from function `MR::OverloadedOps::operator++`. + * + * Calls `MR_C_post_incr_MR_OverloadedOps_B()`. + */ + public static int opPostIncr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Pre-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_decr_MR_OverloadedOps_B()`. + */ + public static int opDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Post-decrement. + * Generated from function `MR::OverloadedOps::operator--`. + * + * Calls `MR_C_post_decr_MR_OverloadedOps_B()`. + */ + public static int opPostDecr(mrbind_test.mr.overloadedops.B _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Comma. + * Generated from function `MR::OverloadedOps::operator,`. + * + * Calls `MR_C_comma_MR_OverloadedOps_B()`. + */ + public static int opComma(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Arrow star. + * Generated from function `MR::OverloadedOps::operator->*`. + * + * Calls `MR_C_arrow_star_MR_OverloadedOps_B()`. + */ + public static int opArrowStar(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_arrow_star_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * If rhs type is same as the lhs one (ignoring cvref), it's not emitted. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.C _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * But different types are printed. + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B()`. + */ + public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overloadedops.B _2) + { + try + { + mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + java.lang.ref.Reference.reachabilityFence(_2); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::OverloadedOps::operator+`. + * + * Calls `MR_C_pos_const_MR_OverloadedOps_D_ref()`. + */ + public static int opPos_const_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_const_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java new file mode 100644 index 00000000..e279ebda --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java @@ -0,0 +1,249 @@ +package mrbind_test.mr.overloads; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_1()`. + */ + public static void a(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_1.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::a`. + * + * Calls `MR_Overloads_a_2()`. + */ + public static void a(int _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_2.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_int()`. + */ + public static void b_int() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_int.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::b`. + * + * Calls `MR_Overloads_b_float()`. + */ + public static void b_float() + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_float.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_int()`. + */ + public static void c(int _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_int.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::c`. + * + * Calls `MR_Overloads_c_float()`. + */ + public static void c(float _1) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_float.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_int()`. + */ + public static void d(byte _1, int _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_int.invokeExact(_1, _2, _3); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::d`. + * + * Calls `MR_Overloads_d_float()`. + */ + public static void d(byte _1, float _2, byte _3) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_float.invokeExact(_1, _2, _3); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_const_int_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e(int _1, java.lang.foreign.MemorySegment _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int_rvalue_ref_int()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int_rvalue_ref_int(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_int.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::e`. + * + * Calls `MR_Overloads_e_int_rvalue_ref_float()`. Some types are raw C types, see the C bindings for the details. + */ + public static void e_int_rvalue_ref_float(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_float.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * This is a fun testcase. Here we must not omit cvref on the first parameter, even if it partially helps with disambiguation, + * because that ultimately leads to an ambiguity. + * So we can only omit cvref if each function has cvref in that parameter). + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_float()`. + */ + public static void f(float _1, int _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_float.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_int_rvalue_ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void f(java.lang.foreign.MemorySegment _1, float _2) + { + try + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_int_rvalue_ref.invokeExact(_1, _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Overloads::f`. + * + * Calls `MR_Overloads_f_const_int_ref()`. + */ + public static void f(int _1, float _2) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java new file mode 100644 index 00000000..335308d0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java @@ -0,0 +1,260 @@ +package mrbind_test.mr.phmap; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_flat_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_flat_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_node_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_node_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_parallel_node_hash_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_set_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_set_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_map_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_map_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multiset_int()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multiset_int _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multiset_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::Phmap::foo`. + * + * Calls `MR_Phmap_foo_phmap_btree_multimap_int_float()`. + */ + public static void foo(mrbind_test.phmap.phmap_btree_multimap_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multimap_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java new file mode 100644 index 00000000..56cc1825 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.signaturefilters.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_A_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.A assignFromAnother(mrbind_test.mr.signaturefilters.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java new file mode 100644 index 00000000..eed467cb --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java @@ -0,0 +1,148 @@ +package mrbind_test.mr.signaturefilters; + +/** + * Generated from class `MR::SignatureFilters::Blah`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Blah extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public Blah(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? Blah::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_SignatureFilters_Blah_DefaultConstruct()`. + */ + public Blah() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::SignatureFilters::Blah::Blah`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_SignatureFilters_Blah_ConstructFromAnother()`. + */ + public Blah(mrbind_test.mr.signaturefilters.Blah _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::SignatureFilters::Blah::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_SignatureFilters_Blah_AssignFromAnother()`. + */ + public mrbind_test.mr.signaturefilters.Blah assignFromAnother(mrbind_test.mr.signaturefilters.Blah _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.Blah(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_SignatureFilters_Blah_Get_a()`. + */ + public mrbind_test.mr.signaturefilters.A a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::SignatureFilters::Blah` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_SignatureFilters_Blah_Set_a()`. + */ + public void setA(mrbind_test.mr.signaturefilters.A value) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(value); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java new file mode 100644 index 00000000..885d08b0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java @@ -0,0 +1,207 @@ +package mrbind_test.mr.signaturefilters; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_1()`. + */ + public static void foo(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo`. + * + * Calls `MR_SignatureFilters_foo_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_0.invokeExact(); + return new mrbind_test.mr.signaturefilters.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_1()`. + */ + public static void foo2(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo2`. + * + * Calls `MR_SignatureFilters_foo2_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_1()`. + */ + public static void foo3(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo3`. + * + * Calls `MR_SignatureFilters_foo3_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_1()`. + */ + public static void foo4(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo4`. + * + * Calls `MR_SignatureFilters_foo4_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_1()`. + */ + public static void foo5(mrbind_test.mr.signaturefilters.A _1) + { + try + { + mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::SignatureFilters::foo5`. + * + * Calls `MR_SignatureFilters_foo5_0()`. + */ + public static mrbind_test.mr.signaturefilters.A foo5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_0.invokeExact(); + java.lang.Object __owner = null; + return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java new file mode 100644 index 00000000..67e6297b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java @@ -0,0 +1,153 @@ +package mrbind_test.mr.staticfuncs; + +/** + * Generated from class `MR::StaticFuncs::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StaticFuncs_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StaticFuncs::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StaticFuncs_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.staticfuncs.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StaticFuncs_A_AssignFromAnother()`. + */ + public mrbind_test.mr.staticfuncs.A assignFromAnother(mrbind_test.mr.staticfuncs.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.staticfuncs.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StaticFuncs::A::blah`. + * + * Calls `MR_StaticFuncs_A_blah()`. + */ + public static void blah() + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_blah.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StaticFuncs::A` named `x`. + * + * Calls `MR_StaticFuncs_A_Get_x()`. + */ + public static int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::StaticFuncs::A` named `x`. + * + * Calls `MR_StaticFuncs_A_Set_x()`. + */ + public static void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java new file mode 100644 index 00000000..3f7589f4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdcontainers; + +/** + * `std::array` behaves differently with simple types. + * Generated from class `MR::StdContainers::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdcontainers.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.A assignFromAnother(mrbind_test.mr.stdcontainers.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java new file mode 100644 index 00000000..bc862092 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java @@ -0,0 +1,744 @@ +package mrbind_test.mr.stdcontainers; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdContainers::Set`. + * + * Calls `MR_StdContainers_Set()`. + */ + public static void Set(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Set.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::SetWithDefault`. + * + * Calls `MR_StdContainers_SetWithDefault()`. + */ + public static void SetWithDefault(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_SetWithDefault.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::Get`. + * + * Calls `MR_StdContainers_Get()`. + */ + public static mrbind_test.mr.cs.std_vector_int Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Get.invokeExact(); + return new mrbind_test.mr.cs.std_vector_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToRef`. + * + * Calls `MR_StdContainers_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::WriteToPtr`. + * + * Calls `MR_StdContainers_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRef`. + * + * Calls `MR_StdContainers_ConstRef()`. + */ + public static void ConstRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::RvalueRef`. + * + * Calls `MR_StdContainers_RvalueRef()`. + */ + public static void RvalueRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_RvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::ConstRvalueRef`. + * + * Calls `MR_StdContainers_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(mrbind_test.mr.cs.std_vector_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Just the list of other containers. + * Generated from function `MR::StdContainers::GetDeque`. + * + * Calls `MR_StdContainers_GetDeque()`. + */ + public static mrbind_test.mr.cs.std_deque_int GetDeque() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDeque.invokeExact(); + return new mrbind_test.mr.cs.std_deque_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetList`. + * + * Calls `MR_StdContainers_GetList()`. + */ + public static mrbind_test.mr.cs.std_list_int GetList() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetList.invokeExact(); + return new mrbind_test.mr.cs.std_list_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSet`. + * + * Calls `MR_StdContainers_GetSet()`. + */ + public static mrbind_test.mr.cs.std_set_int GetSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSet.invokeExact(); + return new mrbind_test.mr.cs.std_set_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSet`. + * + * Calls `MR_StdContainers_GetMultiSet()`. + */ + public static mrbind_test.mr.cs.std_multiset_int GetMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSet.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSet`. + * + * Calls `MR_StdContainers_GetUnorderedSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_int GetUnorderedSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSet.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_set_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSet`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSet()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_int GetUnorderedMultiSet() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSet.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multiset_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMap`. + * + * Calls `MR_StdContainers_GetMap()`. + */ + public static mrbind_test.mr.cs.std_map_int_float GetMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMap.invokeExact(); + return new mrbind_test.mr.cs.std_map_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMap`. + * + * Calls `MR_StdContainers_GetMultiMap()`. + */ + public static mrbind_test.mr.cs.std_multimap_int_float GetMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMap.invokeExact(); + return new mrbind_test.mr.cs.std_multimap_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMap`. + * + * Calls `MR_StdContainers_GetUnorderedMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_int_float GetUnorderedMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMap.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_map_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMap`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMap()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_int_float GetUnorderedMultiMap() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMap.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multimap_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArray`. + * + * Calls `MR_StdContainers_GetStdArray()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 GetStdArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArray.invokeExact(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_A_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArraySimple`. + * + * Calls `MR_StdContainers_GetStdArraySimple()`. + */ + public static mrbind_test.mr.cs.std_array_int_43 GetStdArraySimple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArraySimple.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.cs.std_array_int_43(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * The custom simple array needs a bit more testing: + * Generated from function `MR::StdContainers::StdArraySimpleParam`. + * + * Calls `MR_StdContainers_StdArraySimpleParam()`. + */ + public static void StdArraySimpleParam(mrbind_test.mr.cs.std_array_int_43 _1) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimpleParam.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdContainers::StdArraySimplePtr`. + * + * Calls `MR_StdContainers_StdArraySimplePtr()`. + */ + public static mrbind_test.mr.cs.std_array_int_43 StdArraySimplePtr(mrbind_test.mr.cs.std_array_int_43 param) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimplePtr.invokeExact(mrbind_test.Ffi.ptr(param)); + java.lang.Object __owner = param; + return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_array_int_43(__ret.reinterpret(mrbind_test.mr.cs.std_array_int_43.LAYOUT.byteSize()), __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(param); + } + } + + /** + * For this `std::multiset` specialization, mention all iterators so that they get merged. + * Generated from function `MR::StdContainers::GetMultiSetWithMergedIters`. + * + * Calls `MR_StdContainers_GetMultiSetWithMergedIters()`. + */ + public static mrbind_test.mr.cs.std_multiset_float GetMultiSetWithMergedIters() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetWithMergedIters.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIter`. + * + * Calls `MR_StdContainers_GetMergedIter()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIter() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIter.invokeExact(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMergedIterConst`. + * + * Calls `MR_StdContainers_GetMergedIterConst()`. + */ + public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIterConst() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIterConst.invokeExact(); + return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::NonDefCon`. + * + * Calls `MR_StdContainers_NonDefCon()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible NonDefCon() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefCon.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetVectorNA`. + * + * Calls `MR_StdContainers_GetVectorNA()`. + */ + public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable GetVectorNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetVectorNA.invokeExact(); + return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetDequeNA`. + * + * Calls `MR_StdContainers_GetDequeNA()`. + */ + public static mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable GetDequeNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDequeNA.invokeExact(); + return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetListNA`. + * + * Calls `MR_StdContainers_GetListNA()`. + */ + public static mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable GetListNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetListNA.invokeExact(); + return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetSetNA`. + * + * Calls `MR_StdContainers_GetSetNA()`. + */ + public static mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable GetSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiSetNA`. + * + * Calls `MR_StdContainers_GetMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable GetMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable GetUnorderedSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiSetNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiSetNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable GetUnorderedMultiSetNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSetNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMapNA`. + * + * Calls `MR_StdContainers_GetMapNA()`. + */ + public static mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float GetMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetMultiMapNA`. + * + * Calls `MR_StdContainers_GetMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float GetMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float GetUnorderedMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetUnorderedMultiMapNA`. + * + * Calls `MR_StdContainers_GetUnorderedMultiMapNA()`. + */ + public static mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float GetUnorderedMultiMapNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMapNA.invokeExact(); + return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdContainers::GetStdArrayNA`. + * + * Calls `MR_StdContainers_GetStdArrayNA()`. + */ + public static mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42 GetStdArrayNA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayNA.invokeExact(); + return new mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Fun stuff! + * The type name is a bit weird for this, but at least it works. + * Generated from function `MR::StdContainers::GetStdArrayOfPlainArray`. + * + * Calls `MR_StdContainers_GetStdArrayOfPlainArray()`. + */ + public static mrbind_test.mr.cs.std_array_int_array_4_array_3_5 GetStdArrayOfPlainArray() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayOfPlainArray.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + return new mrbind_test.mr.cs.std_array_int_array_4_array_3_5(__ret, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java new file mode 100644 index 00000000..4a0a4140 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.stdcontainers; + +/** + * A non-assignable type? + * Generated from class `MR::StdContainers::NonAssignable`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonAssignable extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonAssignable(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonAssignable::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdContainers_NonAssignable_DefaultConstruct()`. + */ + public NonAssignable() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonAssignable::NonAssignable`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonAssignable_ConstructFromAnother()`. + */ + public NonAssignable(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonAssignable _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator<`. + * + * Calls `MR_C_less_MR_StdContainers_NonAssignable()`. + */ + public boolean opLess(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_less_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from method `MR::StdContainers::NonAssignable::operator==`. + * + * Calls `MR_C_equal_MR_StdContainers_NonAssignable()`. + */ + public boolean opEqual(mrbind_test.mr.stdcontainers.NonAssignable _1) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_equal_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java new file mode 100644 index 00000000..b3efb8e0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdcontainers; + +/** + * Test vectors of a non-default-constructible type. + * Generated from class `MR::StdContainers::NonDefaultConstructible`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class NonDefaultConstructible extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public NonDefaultConstructible(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? NonDefaultConstructible::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_ConstructFromAnother()`. + */ + public NonDefaultConstructible(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::StdContainers::NonDefaultConstructible::NonDefaultConstructible`. + * + * Calls `MR_StdContainers_NonDefaultConstructible_Construct()`. + */ + public NonDefaultConstructible(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::StdContainers::NonDefaultConstructible::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdContainers_NonDefaultConstructible_AssignFromAnother()`. + */ + public mrbind_test.mr.stdcontainers.NonDefaultConstructible assignFromAnother(mrbind_test.mr.stdcontainers.NonDefaultConstructible _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java new file mode 100644 index 00000000..5fe26d7c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java @@ -0,0 +1,230 @@ +package mrbind_test.mr.stdexpected; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdExpected::GetExp`. + * + * Calls `MR_StdExpected_GetExp()`. + */ + public static mrbind_test.mr.cs.std_expected_int_std_string GetExp() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExp.invokeExact(); + return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExp`. + * + * Calls `MR_StdExpected_SetExp()`. + */ + public static void SetExp(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExp.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpConstRef`. + * + * Calls `MR_StdExpected_SetExpConstRef()`. + */ + public static void SetExpConstRef(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDefTrivial`. + * + * Calls `MR_StdExpected_SetExpDefTrivial()`. + */ + public static void SetExpDefTrivial(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpDef`. + * + * Calls `MR_StdExpected_SetExpDef()`. + */ + public static void SetExpDef(mrbind_test.mr.cs.std_expected_int_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVoid`. + * + * Calls `MR_StdExpected_GetExpVoid()`. + */ + public static mrbind_test.mr.cs.std_expected_void_float GetExpVoid() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVoid.invokeExact(); + return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoid`. + * + * Calls `MR_StdExpected_SetExpVoid()`. + */ + public static void SetExpVoid(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoid.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidConstRef`. + * + * Calls `MR_StdExpected_SetExpVoidConstRef()`. + */ + public static void SetExpVoidConstRef(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDefTrivial`. + * + * Calls `MR_StdExpected_SetExpVoidDefTrivial()`. + */ + public static void SetExpVoidDefTrivial(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDefTrivial.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::SetExpVoidDef`. + * + * Calls `MR_StdExpected_SetExpVoidDef()`. + */ + public static void SetExpVoidDef(mrbind_test.mr.cs.std_expected_void_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdExpected::GetExpVec`. + * + * Calls `MR_StdExpected_GetExpVec()`. + */ + public static mrbind_test.mr.cs.std_vector_std_expected_int_std_string GetExpVec() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVec.invokeExact(); + return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java new file mode 100644 index 00000000..96057460 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -0,0 +1,98 @@ +package mrbind_test.mr.stdfilesystem; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFilesystem::GetPath`. + * + * Calls `MR_StdFilesystem_GetPath()`. + */ + public static mrbind_test.mr.cs.std_filesystem_path GetPath() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_GetPath.invokeExact(); + return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPath`. + * + * Calls `MR_StdFilesystem_SetPath()`. + */ + public static void SetPath(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPath.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathConstRef`. + * + * Calls `MR_StdFilesystem_SetPathConstRef()`. + */ + public static void SetPathConstRef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathConstRef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDefTrivial`. + * + * Calls `MR_StdFilesystem_SetPathDefTrivial()`. + */ + public static void SetPathDefTrivial(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDefTrivial.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdFilesystem::SetPathDef`. + * + * Calls `MR_StdFilesystem_SetPathDef()`. + */ + public static void SetPathDef(java.lang.String _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); + mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java new file mode 100644 index 00000000..12efd32a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.stdfunction; + +/** + * Generated from class `MR::StdFunction::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdFunction_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdFunction::A` elementwise. + * The reference to the parameter `a` might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFrom()`. + */ + public A(java.lang.String a) + { + this(__ctor_constructFrom(a), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String a) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFrom.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdFunction::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdFunction_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdfunction.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdFunction::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdFunction_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdfunction.A assignFromAnother(mrbind_test.mr.stdfunction.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdfunction.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdFunction::A` named `a`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdFunction_A_Get_a()`. + */ + public mrbind_test.mr.cs.std_string a() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdFunction::A` named `a`. + * The reference to the parameter `value` might be preserved in this object in element `a`. + * + * Calls `MR_StdFunction_A_Set_a()`. + */ + public void setA(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/E.java new file mode 100644 index 00000000..bd6df766 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.stdfunction; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java new file mode 100644 index 00000000..a0383c03 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java @@ -0,0 +1,176 @@ +package mrbind_test.mr.stdfunction; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_int_int()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_int_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_int_func_from_int_int()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_int_from_int_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_std_string_func_from_int_float()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_std_string_from_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_std_string_func_from_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_std_string()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_std_string.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdFunction::foo`. + * + * Calls `MR_StdFunction_foo_std_function_MR_StdFunction_A_func()`. + */ + public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_A_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java new file mode 100644 index 00000000..20580fc2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java @@ -0,0 +1,168 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::A` elementwise. + * + * Calls `MR_StdOptional_A_ConstructFrom()`. + */ + public A(int x) + { + this(__ctor_constructFrom(x), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFrom.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdoptional.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::A` named `x`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_A_Get_x()`. + */ + public int x() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::A` named `x`. + * + * Calls `MR_StdOptional_A_Set_x()`. + */ + public void setX(int value) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java new file mode 100644 index 00000000..290a2da7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java @@ -0,0 +1,173 @@ +package mrbind_test.mr.stdoptional; + +/** + * Generated from class `MR::StdOptional::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdOptional_B_DefaultConstruct()`. + */ + public B() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs `MR::StdOptional::B` elementwise. + * The reference to the parameter `s` might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFrom()`. + */ + public B(java.lang.String s) + { + this(__ctor_constructFrom(s), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdOptional::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdOptional_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.stdoptional.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdOptional::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdOptional_B_AssignFromAnother()`. + */ + public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Returns a pointer to a member variable of class `MR::StdOptional::B` named `s`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_StdOptional_B_Get_s()`. + */ + public mrbind_test.mr.cs.std_string s() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_string(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::StdOptional::B` named `s`. + * The reference to the parameter `value` might be preserved in this object in element `s`. + * + * Calls `MR_StdOptional_B_Set_s()`. + */ + public void setS(java.lang.String value) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/E.java new file mode 100644 index 00000000..8049e526 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.stdoptional; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java new file mode 100644 index 00000000..247a7ae7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java @@ -0,0 +1,392 @@ +package mrbind_test.mr.stdoptional; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdOptional::GetInt`. + * + * Calls `MR_StdOptional_GetInt()`. + */ + public static mrbind_test.mr.cs.std_optional_int GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetInt.invokeExact(); + return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetInt`. + * + * Calls `MR_StdOptional_SetInt()`. + */ + public static void SetInt(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetInt.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntConstRef`. + * + * Calls `MR_StdOptional_SetIntConstRef()`. + */ + public static void SetIntConstRef(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDefTrivial`. + * + * Calls `MR_StdOptional_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(int _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetIntDef`. + * + * Calls `MR_StdOptional_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_optional_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetEnum`. + * + * Calls `MR_StdOptional_GetEnum()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_E GetEnum() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetEnum.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnum`. + * + * Calls `MR_StdOptional_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnum.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumConstRef`. + * + * Calls `MR_StdOptional_SetEnumConstRef()`. + */ + public static void SetEnumConstRef(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDefTrivial`. + * + * Calls `MR_StdOptional_SetEnumDefTrivial()`. + */ + public static void SetEnumDefTrivial(mrbind_test.mr.stdoptional.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetEnumDef`. + * + * Calls `MR_StdOptional_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_E _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass`. + * + * Calls `MR_StdOptional_GetClass()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass`. + * + * Calls `MR_StdOptional_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassConstRef`. + * + * Calls `MR_StdOptional_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDefTrivial`. + * + * Calls `MR_StdOptional_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stdoptional.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDefTrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClassDef`. + * + * Calls `MR_StdOptional_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::GetClass2`. + * + * Calls `MR_StdOptional_GetClass2()`. + */ + public static mrbind_test.mr.cs.std_optional_MR_StdOptional_B GetClass2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass2.invokeExact(); + return new mrbind_test.mr.cs.std_optional_MR_StdOptional_B(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2`. + * + * Calls `MR_StdOptional_SetClass2()`. + */ + public static void SetClass2(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2ConstRef`. + * + * Calls `MR_StdOptional_SetClass2ConstRef()`. + */ + public static void SetClass2ConstRef(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2ConstRef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2DefTrivial`. + * + * Calls `MR_StdOptional_SetClass2DefTrivial()`. + */ + public static void SetClass2DefTrivial(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdOptional::SetClass2Def`. + * + * Calls `MR_StdOptional_SetClass2Def()`. + */ + public static void SetClass2Def(mrbind_test.mr.stdoptional.B _1) + { + try + { + mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java new file mode 100644 index 00000000..28b7fcc2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stdsharedptr; + +/** + * Now with a class: + * Generated from class `MR::StdSharedPtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdSharedPtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdSharedPtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdSharedPtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stdsharedptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdSharedPtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdSharedPtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stdsharedptr.A assignFromAnother(mrbind_test.mr.stdsharedptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java new file mode 100644 index 00000000..c20298a2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -0,0 +1,814 @@ +package mrbind_test.mr.stdsharedptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdSharedPtr::GetInt`. + * + * Calls `MR_StdSharedPtr_GetInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetInt.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetInt`. + * + * Calls `MR_StdSharedPtr_SetInt()`. + */ + public static void SetInt(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetInt.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntDefTrivial()`. + */ + public static void SetIntDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntDef`. + * + * Calls `MR_StdSharedPtr_SetIntDef()`. + */ + public static void SetIntDef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueRef()`. + */ + public static void SetIntRvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetIntRvalueConstRef()`. + */ + public static void SetIntRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr`. + * + * Calls `MR_StdSharedPtr_GetIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr`. + * + * Calls `MR_StdSharedPtr_SetIntArr()`. + */ + public static void SetIntArr(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArrDefTrivial()`. + */ + public static void SetIntArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArrDef`. + * + * Calls `MR_StdSharedPtr_SetIntArrDef()`. + */ + public static void SetIntArrDef(mrbind_test.mr.cs.std_shared_ptr_int_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetIntArr42`. + * + * Calls `MR_StdSharedPtr_GetIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 GetIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42`. + * + * Calls `MR_StdSharedPtr_SetIntArr42()`. + */ + public static void SetIntArr42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetIntArr42DefTrivial()`. + */ + public static void SetIntArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetIntArr42Def`. + * + * Calls `MR_StdSharedPtr_SetIntArr42Def()`. + */ + public static void SetIntArr42Def(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClass`. + * + * Calls `MR_StdSharedPtr_GetClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClass.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClass`. + * + * Calls `MR_StdSharedPtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClass.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassDef`. + * + * Calls `MR_StdSharedPtr_SetClassDef()`. + */ + public static void SetClassDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdSharedPtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr`. + * + * Calls `MR_StdSharedPtr_GetClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr`. + * + * Calls `MR_StdSharedPtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArrDef`. + * + * Calls `MR_StdSharedPtr_SetClassArrDef()`. + */ + public static void SetClassArrDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetClassArr42`. + * + * Calls `MR_StdSharedPtr_GetClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 GetClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42`. + * + * Calls `MR_StdSharedPtr_SetClassArr42()`. + */ + public static void SetClassArr42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42DefTrivial`. + * + * Calls `MR_StdSharedPtr_SetClassArr42DefTrivial()`. + */ + public static void SetClassArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdSharedPtr::SetClassArr42Def`. + * + * Calls `MR_StdSharedPtr_SetClassArr42Def()`. + */ + public static void SetClassArr42Def(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 _1) + { + try + { + mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * With constness: + * Try const element types: + * Generated from function `MR::StdSharedPtr::GetConstInt`. + * + * Calls `MR_StdSharedPtr_GetConstInt()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstInt.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int_array GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstIntArr42`. + * + * Calls `MR_StdSharedPtr_GetConstIntArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 GetConstIntArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_int_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClass`. + * + * Calls `MR_StdSharedPtr_GetConstClass()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClass.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdSharedPtr::GetConstClassArr42`. + * + * Calls `MR_StdSharedPtr_GetConstClassArr42()`. + */ + public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 GetConstClassArr42() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr42.invokeExact(); + return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java new file mode 100644 index 00000000..d0049795 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java @@ -0,0 +1,158 @@ +package mrbind_test.mr.stdstring; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdString::Set`. + * + * Calls `MR_StdString_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::SetWithDefault`. + * + * Calls `MR_StdString_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::Get`. + * + * Calls `MR_StdString_Get()`. + */ + public static mrbind_test.mr.cs.std_string Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Get.invokeExact(); + return new mrbind_test.mr.cs.std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::WriteToRef`. + * + * Calls `MR_StdString_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string ref) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdString::WriteToPtr`. + * + * Calls `MR_StdString_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdString::ConstRef`. + * + * Calls `MR_StdString_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::RvalueRef`. + * + * Calls `MR_StdString_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdString::ConstRvalueRef`. + * + * Calls `MR_StdString_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java new file mode 100644 index 00000000..5a809a36 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java @@ -0,0 +1,158 @@ +package mrbind_test.mr.stdstringview; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdStringView::Set`. + * + * Calls `MR_StdStringView_Set()`. + */ + public static void Set(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::SetWithDefault`. + * + * Calls `MR_StdStringView_SetWithDefault()`. + */ + public static void SetWithDefault(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::Get`. + * + * Calls `MR_StdStringView_Get()`. + */ + public static mrbind_test.mr.cs.std_string_view Get() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Get.invokeExact(); + return new mrbind_test.mr.cs.std_string_view(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToRef`. + * + * Calls `MR_StdStringView_WriteToRef()`. + */ + public static void WriteToRef(mrbind_test.mr.cs.std_string_view ref) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ref); + } + } + + /** + * Generated from function `MR::StdStringView::WriteToPtr`. + * + * Calls `MR_StdStringView_WriteToPtr()`. + */ + public static void WriteToPtr(mrbind_test.mr.cs.std_string_view ptr) + { + try + { + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(ptr); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRef`. + * + * Calls `MR_StdStringView_ConstRef()`. + */ + public static void ConstRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::RvalueRef`. + * + * Calls `MR_StdStringView_RvalueRef()`. + */ + public static void RvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdStringView::ConstRvalueRef`. + * + * Calls `MR_StdStringView_ConstRvalueRef()`. + */ + public static void ConstRvalueRef(java.lang.String s) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); + mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java new file mode 100644 index 00000000..fb8bcb01 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -0,0 +1,231 @@ +package mrbind_test.mr.stdtuplelike; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdTupleLike::SetPair`. + * + * Calls `MR_StdTupleLike_SetPair()`. + */ + public static void SetPair(mrbind_test.mr.cs.std_pair_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetPair.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair`. + * + * Calls `MR_StdTupleLike_GetPair()`. + */ + public static mrbind_test.mr.cs.std_pair_int_float GetPair() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair2`. + * + * Calls `MR_StdTupleLike_GetPair2()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_float GetPair2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair2.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair3`. + * + * Calls `MR_StdTupleLike_GetPair3()`. + */ + public static mrbind_test.mr.cs.std_pair_int_ref_float_ref GetPair3() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair3.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int_ref_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair4`. + * + * Calls `MR_StdTupleLike_GetPair4()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref GetPair4() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair4.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair5`. + * + * Calls `MR_StdTupleLike_GetPair5()`. + */ + public static mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref GetPair5() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair5.invokeExact(); + return new mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetPair6`. + * + * Calls `MR_StdTupleLike_GetPair6()`. + */ + public static mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref GetPair6() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair6.invokeExact(); + return new mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::SetTuple`. + * + * Calls `MR_StdTupleLike_SetTuple()`. + */ + public static void SetTuple(mrbind_test.mr.cs.std_tuple_int_float _1) + { + try + { + mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetTuple.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple`. + * + * Calls `MR_StdTupleLike_GetTuple()`. + */ + public static mrbind_test.mr.cs.std_tuple_int_float GetTuple() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Three separate tuples to avoid generating file paths that are too long, as those cause issues on some filesystems apparently. + * Generated from function `MR::StdTupleLike::GetTuple2`. + * + * Calls `MR_StdTupleLike_GetTuple2()`. + */ + public static mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a GetTuple2() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple2.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple7`. + * + * Calls `MR_StdTupleLike_GetTuple7()`. + */ + public static mrbind_test.mr.cs.std_tuple GetTuple7() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple7.invokeExact(); + return new mrbind_test.mr.cs.std_tuple(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdTupleLike::GetTuple8`. + * + * Calls `MR_StdTupleLike_GetTuple8()`. + */ + public static mrbind_test.mr.cs.std_tuple_float_double_int_int GetTuple8() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple8.invokeExact(); + return new mrbind_test.mr.cs.std_tuple_float_double_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java new file mode 100644 index 00000000..fa476c36 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java @@ -0,0 +1,102 @@ +package mrbind_test.mr.stduniqueptr; + +/** + * Now with a class: + * Generated from class `MR::StdUniquePtr::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_StdUniquePtr_A_DefaultConstruct()`. + */ + public A() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::StdUniquePtr::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_StdUniquePtr_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.stduniqueptr.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::StdUniquePtr::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_StdUniquePtr_A_AssignFromAnother()`. + */ + public mrbind_test.mr.stduniqueptr.A assignFromAnother(mrbind_test.mr.stduniqueptr.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java new file mode 100644 index 00000000..68a50334 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -0,0 +1,596 @@ +package mrbind_test.mr.stduniqueptr; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdUniquePtr::GetInt`. + * + * Calls `MR_StdUniquePtr_GetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetInt.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetInt`. + * + * Calls `MR_StdUniquePtr_SetInt()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetInt(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetInt.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntConstRef()`. + */ + public static void SetIntConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntDef`. + * + * Calls `MR_StdUniquePtr_SetIntDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueRef()`. + */ + public static void SetIntLvalueRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntLvalueConstRef()`. + */ + public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetIntRvalueConstRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRvalueConstRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueConstRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetIntArr`. + * + * Calls `MR_StdUniquePtr_GetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetIntArr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArr`. + * + * Calls `MR_StdUniquePtr_SetIntArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetIntArrDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetIntArrDef`. + * + * Calls `MR_StdUniquePtr_SetIntArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClass`. + * + * Calls `MR_StdUniquePtr_GetClass()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClass.invokeExact(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClass`. + * + * Calls `MR_StdUniquePtr_SetClass()`. + */ + public static void SetClass(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClass.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassConstRef()`. + */ + public static void SetClassConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassDefTrivial()`. + */ + public static void SetClassDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassDef`. + * + * Calls `MR_StdUniquePtr_SetClassDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueRef()`. + */ + public static void SetClassLvalueRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassLvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassLvalueConstRef()`. + */ + public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueRef()`. + */ + public static void SetClassRvalueRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassRvalueConstRef`. + * + * Calls `MR_StdUniquePtr_SetClassRvalueConstRef()`. + */ + public static void SetClassRvalueConstRef(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueConstRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetClassArr`. + * + * Calls `MR_StdUniquePtr_GetClassArr()`. + */ + public static mrbind_test.mr.stduniqueptr.A GetClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClassArr.invokeExact(); + return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArr`. + * + * Calls `MR_StdUniquePtr_SetClassArr()`. + */ + public static void SetClassArr(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArr.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetClassArrDefTrivial()`. + */ + public static void SetClassArrDefTrivial(mrbind_test.mr.stduniqueptr.A _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetClassArrDef`. + * + * Calls `MR_StdUniquePtr_SetClassArrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetClassArrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Try const element types: + * Generated from function `MR::StdUniquePtr::GetConstInt`. + * + * Calls `MR_StdUniquePtr_GetConstInt()`. + */ + public static int GetConstInt() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstInt.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstIntArr`. + * + * Calls `MR_StdUniquePtr_GetConstIntArr()`. + */ + public static int GetConstIntArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstIntArr.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClass`. + * + * Calls `MR_StdUniquePtr_GetConstClass()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClass() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClass.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::GetConstClassArr`. + * + * Calls `MR_StdUniquePtr_GetConstClassArr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstClassArr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClassArr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Here `std::unique_ptr` never gets emitted as an actual type (since we don't have non-null default arguments), so its header should not be emitted. + * Generated from function `MR::StdUniquePtr::GetFloat`. + * + * Calls `MR_StdUniquePtr_GetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetFloat() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetFloat.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloat`. + * + * Calls `MR_StdUniquePtr_SetFloat()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloat(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloat.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdUniquePtr::SetFloatDefTrivial`. + * + * Calls `MR_StdUniquePtr_SetFloatDefTrivial()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetFloatDefTrivial(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloatDefTrivial.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java new file mode 100644 index 00000000..5cc227f5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java @@ -0,0 +1,86 @@ +package mrbind_test.mr.stdvariant; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::StdVariant::foo`. + * + * Calls `MR_StdVariant_foo()`. + */ + public static mrbind_test.mr.cs.std_variant_int_float foo() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_foo.invokeExact(); + return new mrbind_test.mr.cs.std_variant_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::StdVariant::bar`. + * + * Calls `MR_StdVariant_bar()`. + */ + public static void bar(mrbind_test.mr.cs.std_variant_int_float_float _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::baz`. + * + * Calls `MR_StdVariant_baz()`. + */ + public static void baz(mrbind_test.mr.cs.std_variant_int_float_std_string _1) + { + try + { + mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_baz.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::StdVariant::blah`. + * + * Calls `MR_StdVariant_blah()`. + */ + public static mrbind_test.mr.cs.std_variant_std_monostate_int_float blah() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_blah.invokeExact(); + return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java new file mode 100644 index 00000000..582b6481 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java @@ -0,0 +1,93 @@ +package mrbind_test.mr.tags; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_int()`. + */ + public static void foo_1_std_less_int() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_int.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_less_void()`. + */ + public static void foo_1_std_less_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_void.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_int()`. + */ + public static void foo_1_std_greater_int() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_int.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_1_std_greater_void()`. + */ + public static void foo_1_std_greater_void() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_void.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::Tags::foo`. + * + * Calls `MR_Tags_foo_0()`. + */ + public static void foo_0() + { + try + { + mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_0.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java new file mode 100644 index 00000000..eccd9422 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -0,0 +1,207 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Class templates. + * Generated from class `MR::TestSimpleTypes::ClassTemplate`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class ClassTemplate_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public ClassTemplate_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? ClassTemplate_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother()`. + */ + public ClassTemplate_uint64_t(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t()`. + */ + public ClassTemplate_uint64_t(long _1) + { + this(__ctor_construct_uint64_t(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_uint64_t(long _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructors. + * Generated from constructor `MR::TestSimpleTypes::ClassTemplate::ClassTemplate`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int()`. + */ + public ClassTemplate_uint64_t(int _1) + { + this(__ctor_construct_int(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct_int(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from method `MR::TestSimpleTypes::ClassTemplate::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother()`. + */ + public mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t assignFromAnother(mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t()`. + */ + public void foo_uint64_t() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Methods. + * Generated from method `MR::TestSimpleTypes::ClassTemplate::foo`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int()`. + */ + public void foo_int() + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t()`. + */ + public static long var_() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t.invokeExact(); + return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::TestSimpleTypes::ClassTemplate` named `var`. + * The reference to the parameter `value` might be preserved in this object in element `var`. + * + * Calls `MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t()`. + */ + public static void setVar(long value) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java new file mode 100644 index 00000000..62753798 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t_Enum.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * Enums. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class ClassTemplate_uint64_t_Enum +{ + public final int value; + + public ClassTemplate_uint64_t_Enum(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static ClassTemplate_uint64_t_Enum of(int value) + { + return new ClassTemplate_uint64_t_Enum(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof ClassTemplate_uint64_t_Enum o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "ClassTemplate_uint64_t_Enum(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E.java new file mode 100644 index 00000000..7029ea94 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E.java @@ -0,0 +1,28 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E +{ + public final int value; + + public E(int value) {this.value = value;} + + public static final E e1 = new E(0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E of(int value) + { + if (value == e1.value) return e1; + return new E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E2.java new file mode 100644 index 00000000..9069a41b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E2.java @@ -0,0 +1,30 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has a custom underlying type. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E2 +{ + public final short value; + + public E2(short value) {this.value = value;} + + public static final E2 e1 = new E2((short)0); + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E2 of(short value) + { + if (value == e1.value) return e1; + return new E2(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E2 o && o.value == value;} + @java.lang.Override public int hashCode() {return (int)value;} + @java.lang.Override public java.lang.String toString() + { + if (value == e1.value) return "e1"; + return "E2(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E3.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E3.java new file mode 100644 index 00000000..f3991b6c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E3.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This enum has no constants. + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E3 +{ + public final int value; + + public E3(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E3 of(int value) + { + return new E3(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E3 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E3(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E4.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E4.java new file mode 100644 index 00000000..2a2f676e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E4.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This has multiple words in the underlying type. This has caused a bug at one point... + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E4 +{ + public final int value; + + public E4(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E4 of(int value) + { + return new E4(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E4 o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "E4(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E5.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E5.java new file mode 100644 index 00000000..4525186f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/E5.java @@ -0,0 +1,27 @@ +package mrbind_test.mr.testsimpletypes; + +/** + * This will use a custom typedef for the underlying type, if that's enabled! + * + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class E5 +{ + public final long value; + + public E5(long value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static E5 of(long value) + { + return new E5(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof E5 o && o.value == value;} + @java.lang.Override public int hashCode() {return java.lang.Long.hashCode(value);} + @java.lang.Override public java.lang.String toString() + { + return "E5(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java new file mode 100644 index 00000000..3dfd795a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -0,0 +1,860 @@ +package mrbind_test.mr.testsimpletypes; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSimpleTypes::GetInt`. + * + * Calls `MR_TestSimpleTypes_GetInt()`. + */ + public static int GetInt() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetInt.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetInt`. + * + * Calls `MR_TestSimpleTypes_SetInt()`. + */ + public static void SetInt(int _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetInt.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntDef`. + * + * Calls `MR_TestSimpleTypes_SetIntDef()`. + */ + public static void SetIntDef(java.lang.Integer _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntPtr`. + * + * Calls `MR_TestSimpleTypes_GetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtr`. + * + * Calls `MR_TestSimpleTypes_SetIntPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetIntPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetIntRef`. + * + * Calls `MR_TestSimpleTypes_GetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetIntRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntRef.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRef`. + * + * Calls `MR_TestSimpleTypes_SetIntRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetIntRefDef`. + * + * Calls `MR_TestSimpleTypes_SetIntRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetIntRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_GetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetConstVoidPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetConstVoidPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtr`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetConstVoidPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetConstVoidPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetConstVoidPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_GetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetVoidPtrPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtrPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtr`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetVoidPtrPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetVoidPtrPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetVoidPtrPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum`. + * + * Calls `MR_TestSimpleTypes_GetEnum()`. + */ + public static int GetEnum() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum`. + * + * Calls `MR_TestSimpleTypes_SetEnum()`. + */ + public static void SetEnum(mrbind_test.mr.testsimpletypes.E _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumDef()`. + */ + public static void SetEnumDef(mrbind_test.mr.testsimpletypes.E _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1.value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_GetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumPtr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumPtr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtr`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumPtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnumPtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumPtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnumRef`. + * + * Calls `MR_TestSimpleTypes_GetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnumRef() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumRef.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnumRefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnumRefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnumRefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2`. + * + * Calls `MR_TestSimpleTypes_GetEnum2()`. + */ + public static int GetEnum2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2`. + * + * Calls `MR_TestSimpleTypes_SetEnum2()`. + */ + public static void SetEnum2(mrbind_test.mr.testsimpletypes.E2 _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Def`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Def()`. + */ + public static void SetEnum2Def(mrbind_test.mr.testsimpletypes.E2 _1) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Def.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, _1.value))); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ptr() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ptr.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ptr`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2PtrDefNull`. + * + * Calls `MR_TestSimpleTypes_SetEnum2PtrDefNull()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2PtrDefNull(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDefNull.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::GetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_GetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment GetEnum2Ref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ref.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2Ref`. + * + * Calls `MR_TestSimpleTypes_SetEnum2Ref()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2Ref(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ref.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::SetEnum2RefDef`. + * + * Calls `MR_TestSimpleTypes_SetEnum2RefDef()`. Some types are raw C types, see the C bindings for the details. + */ + public static void SetEnum2RefDef(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2RefDef.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Test all kinds of `char`. + * Generated from function `MR::TestSimpleTypes::CheckCharMaybeUnsigned`. + * + * Calls `MR_TestSimpleTypes_CheckCharMaybeUnsigned()`. Some types are raw C types, see the C bindings for the details. + */ + public static void CheckCharMaybeUnsigned(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckCharMaybeUnsigned.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_unsigned_char_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_unsigned_char_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_unsigned_char_ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::CheckChar`. + * + * Calls `MR_TestSimpleTypes_CheckChar_signed_char_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static void checkChar_signed_char_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_signed_char_ptr.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_uint64_t()`. + */ + public static long blah_uint64_t(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_uint64_t.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSimpleTypes::blah`. + * + * Calls `MR_TestSimpleTypes_blah_int64_t()`. + */ + public static long blah_int64_t(long x) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_int64_t.invokeExact(x); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_uint64_t()`. + */ + public static long FuncTemplate(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Function templates. + * Generated from function `MR::TestSimpleTypes::FuncTemplate`. + * + * Calls `MR_TestSimpleTypes_FuncTemplate_int()`. + */ + public static int FuncTemplate(int _1) + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_int.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java new file mode 100644 index 00000000..fb8a1130 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java @@ -0,0 +1,123 @@ +package mrbind_test.mr.testsizet; + +/** + * Generated from class `MR::TestSizeT::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_uint64_t extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_uint64_t(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_uint64_t::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TestSizeT_A_uint64_t_DefaultConstruct()`. + */ + public A_uint64_t() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TestSizeT::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TestSizeT_A_uint64_t_ConstructFromAnother()`. + */ + public A_uint64_t(mrbind_test.mr.testsizet.A_uint64_t _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.testsizet.A_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TestSizeT_A_uint64_t_AssignFromAnother()`. + */ + public mrbind_test.mr.testsizet.A_uint64_t assignFromAnother(mrbind_test.mr.testsizet.A_uint64_t _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.testsizet.A_uint64_t(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TestSizeT::A::foo`. + * + * Calls `MR_TestSizeT_A_uint64_t_foo()`. + */ + public long foo() + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java new file mode 100644 index 00000000..68382cc2 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java @@ -0,0 +1,124 @@ +package mrbind_test.mr.testsizet; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_uint64_t()`. + */ + public static long foo_uint64_t(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_uint64_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_uint64_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t_ptr.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_uint64_t()`. + */ + public static mrbind_test.mr.cs.std_vector_uint64_t foo(mrbind_test.mr.cs.std_vector_uint64_t _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_uint64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.cs.std_vector_uint64_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_int64_t()`. + */ + public static long foo_int64_t(long _1) + { + try + { + long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_int64_t_ptr()`. Some types are raw C types, see the C bindings for the details. + */ + public static java.lang.foreign.MemorySegment foo_int64_t_ptr(java.lang.foreign.MemorySegment _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t_ptr.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from function `MR::TestSizeT::foo`. + * + * Calls `MR_TestSizeT_foo_std_vector_int64_t()`. + */ + public static mrbind_test.mr.cs.std_vector_int64_t foo(mrbind_test.mr.cs.std_vector_int64_t _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_int64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + return new mrbind_test.mr.cs.std_vector_int64_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_1); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java new file mode 100644 index 00000000..39f729d6 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java @@ -0,0 +1,125 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * This tests a specific Clang bug/quirk. + * Certain typedefs in templates get their names printed without the template arguments of the enclosing class template, breaking our code generation. + * Generated from class `MR::TypedefsInTemplates::A`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_A_int_DefaultConstruct()`. + */ + public A_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_A_int_ConstructFromAnother()`. + */ + public A_int(mrbind_test.mr.typedefsintemplates.A_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_A_int_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.A_int assignFromAnother(mrbind_test.mr.typedefsintemplates.A_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.A_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::A::foo`. + * + * Calls `MR_TypedefsInTemplates_A_int_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java new file mode 100644 index 00000000..6aaf4cd1 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java @@ -0,0 +1,101 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int_DefaultConstruct()`. + */ + public B_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int_ConstructFromAnother()`. + */ + public B_int(mrbind_test.mr.typedefsintemplates.B_int _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java new file mode 100644 index 00000000..f1a1c7a0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java @@ -0,0 +1,145 @@ +package mrbind_test.mr.typedefsintemplates; + +/** + * Generated from class `MR::TypedefsInTemplates::B::BB`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B_int_BB_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B_int_BB_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B_int_BB_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct()`. + */ + public B_int_BB_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from constructor `MR::TypedefsInTemplates::B::BB::BB`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother()`. + */ + public B_int_BB_float(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother()`. + */ + public mrbind_test.mr.typedefsintemplates.B_int_BB_float assignFromAnother(mrbind_test.mr.typedefsintemplates.B_int_BB_float _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.typedefsintemplates.B_int_BB_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo`. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_foo()`. + */ + public int foo() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::TypedefsInTemplates::B::BB::foo2`. + * + * Calls `MR_TypedefsInTemplates_B_int_BB_float_foo2()`. + */ + public int foo2() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo2.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java new file mode 100644 index 00000000..fb77bd94 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.typedefsintemplates; + +/** The free functions of this namespace. Generated by mrbind, do not edit. */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class Functions +{ + private Functions() {} + + /** + * Generated from function `MR::TypedefsInTemplates::bar`. + * + * Calls `MR_TypedefsInTemplates_bar()`. + */ + public static void bar(int _1) + { + try + { + mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_bar.invokeExact(_1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java new file mode 100644 index 00000000..26dd7170 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java @@ -0,0 +1,265 @@ +package mrbind_test.mr.usingdecls; + +/** + * Test how `using` declarations import things. + * Generated from class `MR::UsingDecls::A`. + * Derived classes: + * Direct: (non-virtual) + * `MR::UsingDecls::B` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class A extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public A(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? A::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_A_ConstructFromAnother()`. + */ + public A(mrbind_test.mr.usingdecls.A _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from constructor `MR::UsingDecls::A::A`. + * + * Calls `MR_UsingDecls_A_Construct()`. + */ + public A(int _1) + { + this(__ctor_construct(_1), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_construct(int _1) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Construct.invokeExact(_1); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Generated from conversion operator `MR::UsingDecls::A::operator int`. + * + * Calls `MR_UsingDecls_A_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_A_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.A assignFromAnother(mrbind_test.mr.usingdecls.A _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.A(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::A::operator=`. + * + * Calls `MR_UsingDecls_A_assign()`. + */ + public void assign(int _1) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_assign.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::Method`. + * + * Calls `MR_UsingDecls_A_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::A::StaticFunc`. + * + * Calls `MR_UsingDecls_A_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * + * Calls `MR_UsingDecls_A_Get_StaticVar()`. + */ + public static int StaticVar() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `StaticVar`. + * + * Calls `MR_UsingDecls_A_Set_StaticVar()`. + */ + public static void setStaticVar(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::A` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_UsingDecls_A_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::A` named `Field`. + * + * Calls `MR_UsingDecls_A_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A_E.java new file mode 100644 index 00000000..73683b21 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A_E.java @@ -0,0 +1,25 @@ +package mrbind_test.mr.usingdecls; + +/** + * The constants are static fields of this class. `value` holds the underlying value, so this can also hold values that aren't named constants. + */ +public final class A_E +{ + public final int value; + + public A_E(int value) {this.value = value;} + + + /** Returns the named constant with this value, or a new instance if there's none. */ + public static A_E of(int value) + { + return new A_E(value); + } + + @java.lang.Override public boolean equals(java.lang.Object other) {return other instanceof A_E o && o.value == value;} + @java.lang.Override public int hashCode() {return value;} + @java.lang.Override public java.lang.String toString() + { + return "A_E(" + value + ")"; + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java new file mode 100644 index 00000000..6502f976 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java @@ -0,0 +1,241 @@ +package mrbind_test.mr.usingdecls; + +/** + * Generated from class `MR::UsingDecls::B`. + * Base classes: + * Direct: (non-virtual) + * `MR::UsingDecls::A` + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class B extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public B(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? B::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Generated from constructor `MR::UsingDecls::B::B`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in the constructed object. + * + * Calls `MR_UsingDecls_B_ConstructFromAnother()`. + */ + public B(mrbind_test.mr.usingdecls.B _other) + { + this(__ctor_constructFromAnother(_other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from conversion operator `MR::UsingDecls::B::operator int`. + * + * Calls `MR_UsingDecls_B_ConvertTo_int()`. + */ + public int convertTo_int() + { + try + { + int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConvertTo_int.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::operator=`. + * The reference to things referred to by the parameter `_other` (if any) might be preserved in this object. + * + * Calls `MR_UsingDecls_B_AssignFromAnother()`. + */ + public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B _other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.Object __owner = this; + return new mrbind_test.mr.usingdecls.B(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(_other); + } + } + + /** + * Generated from method `MR::UsingDecls::B::operator=`. + * + * Calls `MR_UsingDecls_B_assign()`. + */ + public void assign(int _1) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_assign.invokeExact(rawPointer(), _1); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::Method`. + * + * Calls `MR_UsingDecls_B_Method()`. + */ + public void Method() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Method.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Generated from method `MR::UsingDecls::B::StaticFunc`. + * + * Calls `MR_UsingDecls_B_StaticFunc()`. + */ + public static void StaticFunc() + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_StaticFunc.invokeExact(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::B` named `Field`. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_UsingDecls_B_Get_Field()`. + */ + public int Field() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_Field.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::B` named `Field`. + * + * Calls `MR_UsingDecls_B_Set_Field()`. + */ + public void setField(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_Field.invokeExact(rawPointer(), value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns a pointer to a member variable of class `MR::UsingDecls::B` named `StaticVar`. + * + * Calls `MR_UsingDecls_B_Get_StaticVar()`. + */ + public static int StaticVar() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_StaticVar.invokeExact(); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Modifies a member variable of class `MR::UsingDecls::B` named `StaticVar`. + * + * Calls `MR_UsingDecls_B_Set_StaticVar()`. + */ + public static void setStaticVar(int value) + { + try + { + mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_StaticVar.invokeExact(value); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java new file mode 100644 index 00000000..f7d0879c --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_DefaultConstruct()`. + */ + public phmap_btree_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float(mrbind_test.phmap.phmap_btree_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java new file mode 100644 index 00000000..ffa7206f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_btree_map_int_float_const_iterator(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java new file mode 100644 index 00000000..02bb2b62 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_map_int_float_iterator(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_map_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java new file mode 100644 index 00000000..8c556aa0 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java @@ -0,0 +1,416 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multimap`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multimap_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multimap_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multimap_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multimap_int_float_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_find()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_end()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java new file mode 100644 index 00000000..50d58b9a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java @@ -0,0 +1,238 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable()`. + */ + public phmap_btree_multimap_int_float_const_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java new file mode 100644 index 00000000..48fe1a90 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java @@ -0,0 +1,211 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_btree_multimap_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multimap_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multimap_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multimap_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct()`. + */ + public phmap_btree_multimap_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multimap_int_float_iterator(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a mutable iterator. + * + * Calls `MR_C_phmap_btree_multimap_int_float_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java new file mode 100644 index 00000000..e5af6340 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_multiset`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int_DefaultConstruct()`. + */ + public phmap_btree_multiset_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int(mrbind_test.phmap.phmap_btree_multiset_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_multiset_int_ConstructFromRange()`. + */ + public phmap_btree_multiset_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_multiset_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_multiset_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_multiset_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_multiset_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_multiset_int_count()`. + */ + public long count(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_find()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_btree_multiset_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_begin()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_end()`. + */ + public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java new file mode 100644 index 00000000..aed15913 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_multiset_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_multiset_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_multiset_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_multiset_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_multiset_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_multiset_int_const_iterator(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_multiset_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java new file mode 100644 index 00000000..bffc3f7e --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::btree_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int_DefaultConstruct()`. + */ + public phmap_btree_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int_ConstructFromAnother()`. + */ + public phmap_btree_set_int(mrbind_test.phmap.phmap_btree_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_btree_set_int_ConstructFromRange()`. + */ + public phmap_btree_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_btree_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_btree_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_btree_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_btree_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_btree_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_find()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_btree_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_btree_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_btree_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_end()`. + */ + public mrbind_test.phmap.phmap_btree_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_btree_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_btree_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java new file mode 100644 index 00000000..f1347998 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java @@ -0,0 +1,164 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_btree_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_btree_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_btree_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_btree_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_btree_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_btree_set_int_const_iterator(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Decrements a const iterator. + * + * Calls `MR_C_phmap_btree_set_int_const_iterator_decr()`. + */ + public void decr() + { + try + { + mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_decr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java new file mode 100644 index 00000000..86fb70b8 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..2668ebda --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java new file mode 100644 index 00000000..70c0c192 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_map_int_float_iterator(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_flat_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java new file mode 100644 index 00000000..9729b9cc --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int_ConstructFromRange()`. + */ + public phmap_flat_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_flat_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_flat_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_flat_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_flat_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_flat_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_flat_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java new file mode 100644 index 00000000..5e2b0794 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_flat_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_flat_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_flat_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_flat_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_flat_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_flat_hash_set_int_const_iterator(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_flat_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java new file mode 100644 index 00000000..c077ca28 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..c8ed06fd --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java new file mode 100644 index 00000000..7e0ef250 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_map_int_float_iterator(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_node_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java new file mode 100644 index 00000000..f1c91a19 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int_DefaultConstruct()`. + */ + public phmap_node_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int(mrbind_test.phmap.phmap_node_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_node_hash_set_int_ConstructFromRange()`. + */ + public phmap_node_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_node_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_node_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_node_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_node_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_node_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_node_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java new file mode 100644 index 00000000..8696bfa7 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_node_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_node_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_node_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_node_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_node_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_node_hash_set_int_const_iterator(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_node_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java new file mode 100644 index 00000000..9fdc684f --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..eed306f4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_flat_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java new file mode 100644 index 00000000..b78ea3b5 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_flat_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_map_int_float_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java new file mode 100644 index 00000000..d243f4ea --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_flat_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange()`. + */ + public phmap_parallel_flat_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java new file mode 100644 index 00000000..2b83ae90 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_flat_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_flat_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_flat_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_flat_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_flat_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_flat_hash_set_int_const_iterator(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java new file mode 100644 index 00000000..c130c734 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java @@ -0,0 +1,439 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_map`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns the element with the specific key. If it doesn't exist, creates it first. Acts like map's `operator[]` in C++. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment find_or_construct_elem(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a mutable iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_find_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator find_mut(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The begin iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_begin_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator begin_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, mutable. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_end_mut()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator end_mut() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a mutable iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java new file mode 100644 index 00000000..06e3f1f4 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java @@ -0,0 +1,217 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Makes a const iterator from a mutable one. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable()`. + */ + public phmap_parallel_node_hash_map_int_float_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + this(__ctor_from_mutable(iter), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator iter) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a const iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value()`. + */ + public float deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java new file mode 100644 index 00000000..2292924b --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java @@ -0,0 +1,190 @@ +package mrbind_test.phmap; + +/** + * Mutable iterator for `MR_C_phmap_parallel_node_hash_map_int_float`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_map_int_float_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_map_int_float_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_map_int_float_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_map_int_float_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_map_int_float_iterator(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a mutable iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref()`. + */ + public mrbind_test.mr.cs.std_pair_const_int_float deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + java.lang.Object __owner = this; + return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the key. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key()`. + */ + public int deref_key() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Dereferences a mutable iterator, returning the mapped value. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value()`. Some types are raw C types, see the C bindings for the details. + */ + public java.lang.foreign.MemorySegment deref_value() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a mutable iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java new file mode 100644 index 00000000..d4886680 --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java @@ -0,0 +1,366 @@ +package mrbind_test.phmap; + +/** + * Generated from C++ container `phmap::parallel_node_hash_set`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Construct from a range of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange()`. + */ + public phmap_parallel_node_hash_set_int(java.lang.Integer ptr, long size) + { + this(__ctor_constructFromRange(ptr, size), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Assign from a range of elements, overwriting previous contents. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_AssignFromRange()`. + */ + public void assignFromRange(java.lang.Integer ptr, long size) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The number of elements. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_size()`. + */ + public long size() + { + try + { + long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_size.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Returns true if the size is zero. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_empty()`. + */ + public boolean empty() + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_empty.invokeExact(rawPointer()); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Removes all elements from the container. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_clear()`. + */ + public void clear() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_clear.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Checks if the contain contains this key. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_contains()`. + */ + public boolean contains(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Finds the element by key, or returns the end iterator if no such key. Returns a read-only iterator. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_find()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator find(int key) + { + try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Inserts a new element. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_insert()`. + */ + public void insert(int new_elem) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * The begin iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_begin()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator begin() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_begin.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the begin iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_is_begin()`. + */ + public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } + + /** + * The end iterator, const. + * The reference to this object might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_end()`. + */ + public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator end() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_end.invokeExact(rawPointer()); + return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Tests whether a const iterator is the end iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_is_end()`. + */ + public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator iter) + { + try + { + boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(iter); + } + } +} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java new file mode 100644 index 00000000..eb61de6a --- /dev/null +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java @@ -0,0 +1,143 @@ +package mrbind_test.phmap; + +/** + * Read-only iterator for `MR_C_phmap_parallel_node_hash_set_int`. + * + * Instances created here own their C++ objects, see `CppObject`. + */ +@java.lang.SuppressWarnings({"restricted", "cast"}) +public final class phmap_parallel_node_hash_set_int_const_iterator extends mrbind_test.CppObject +{ + /** Wraps a pointer from the C bindings. If `owned`, the object is destroyed when the wrapper dies. `owner` is kept alive as long as this wrapper is. Not for normal use. */ + public phmap_parallel_node_hash_set_int_const_iterator(java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner) {super(ptr, owned ? phmap_parallel_node_hash_set_int_const_iterator::__destroy : null, owner);} + + private static void __destroy(java.lang.foreign.MemorySegment ptr) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_Destroy.invokeExact(ptr); + } + catch (java.lang.Throwable e) + { + throw mrbind_test.Ffi.rethrow(e); + } + } + + /** + * Constructs an empty (default-constructed) instance. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct()`. + */ + public phmap_parallel_node_hash_set_int_const_iterator() + { + this(__ctor_defaultConstruct(), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** + * Constructs a copy of another instance. The source remains alive. + * The reference to the parameter `other` might be preserved in the constructed object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother()`. + */ + public phmap_parallel_node_hash_set_int_const_iterator(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + this(__ctor_constructFromAnother(other), true, null); + } + + private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + return __ret; + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Assigns the contents from another instance. Both objects remain alive after the call. + * The reference to the parameter `other` might be preserved in this object. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother()`. + */ + public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator other) + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + java.lang.ref.Reference.reachabilityFence(other); + } + } + + /** + * Dereferences a const iterator. + * The reference to things referred to by this object (if any) might be preserved as the return value. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref()`. + */ + public int deref() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** + * Increments a const iterator. + * + * Calls `MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr()`. + */ + public void incr() + { + try + { + mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } +} From 8a0b7ea6c2cc6d8ebdb1bfc929dc1005f6436846 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 14:49:54 +0300 Subject: [PATCH 04/10] Java: load the library with LoadLibraryExW(LOAD_WITH_ALTERED_SEARCH_PATH) on Windows The directory of java.exe comes first in the default DLL search order, and the JDK ships freetype.dll, which shadowed the real one and made MeshLibC2.dll fail with "The specified procedure could not be found". With the altered search path the dependencies are looked up next to the library first. Co-Authored-By: Claude Fable 5.1 --- src/generators/java/generator.cpp | 80 ++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 12 deletions(-) diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp index b3dda0da..58fe6164 100644 --- a/src/generators/java/generator.cpp +++ b/src/generators/java/generator.cpp @@ -869,8 +869,10 @@ public abstract class CppStruct implements Native ffi += ");\n"; ffi += " private static final java.util.Map LOOKUPS = new java.util.HashMap<>();\n\n"; ffi += R"( /** - * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, - * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + * The symbols of the library of a file group. The library is loaded on the first use from `java.library.path` + * (on Windows with `LOAD_WITH_ALTERED_SEARCH_PATH`, so its dependencies are found next to it before anything else: the directory of `java.exe` + * comes first in the default search order, and it has DLLs like `freetype.dll` that can shadow the real ones). + * If that fails, it's loaded with `System.loadLibrary()`, and then by its platform-specific file name through the system loader. */ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) { @@ -880,21 +882,26 @@ public abstract class CppStruct implements Native String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); - try - { - System.loadLibrary(lib); - ret = java.lang.foreign.SymbolLookup.loaderLookup(); - } - catch (UnsatisfiedLinkError e) + if (IS_WINDOWS) + ret = windowsLookup(System.mapLibraryName(lib)); + if (ret == null) { try { - ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); } - catch (IllegalArgumentException e2) + catch (UnsatisfiedLinkError e) { - e.addSuppressed(e2); - throw e; + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } } } LOOKUPS.put(group, ret); @@ -902,6 +909,55 @@ public abstract class CppStruct implements Native return ret; } + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + { + java.nio.file.Path path = null; + for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) + { + if (dir.isEmpty()) + continue; + java.nio.file.Path candidate = java.nio.file.Path.of(dir, fileName); + if (java.nio.file.Files.isRegularFile(candidate)) + { + path = candidate.toAbsolutePath(); + break; + } + } + if (path == null) + return null; + try + { + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + if (module.address() == 0) + return null; + return name -> + { + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); + } + catch (Throwable e) + { + throw rethrow(e); + } + }; + } + catch (Throwable e) + { + return null; + } + } + /** * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. From 00ed270249e3bce14506774ef55e27b8557fb28e Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 15:04:18 +0300 Subject: [PATCH 05/10] Java: regenerate the test outputs after the Windows loader change Co-Authored-By: Claude Fable 5.1 --- test/output_java/src/mrbind_test/Ffi.java | 80 ++++++++++++++++--- .../src/mrbind_test/Ffi.java | 80 ++++++++++++++++--- .../src/mrbind_test/Ffi.java | 80 ++++++++++++++++--- 3 files changed, 204 insertions(+), 36 deletions(-) diff --git a/test/output_java/src/mrbind_test/Ffi.java b/test/output_java/src/mrbind_test/Ffi.java index e1088a69..2ff4eab2 100644 --- a/test/output_java/src/mrbind_test/Ffi.java +++ b/test/output_java/src/mrbind_test/Ffi.java @@ -26,8 +26,10 @@ private Ffi() {} private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); /** - * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, - * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + * The symbols of the library of a file group. The library is loaded on the first use from `java.library.path` + * (on Windows with `LOAD_WITH_ALTERED_SEARCH_PATH`, so its dependencies are found next to it before anything else: the directory of `java.exe` + * comes first in the default search order, and it has DLLs like `freetype.dll` that can shadow the real ones). + * If that fails, it's loaded with `System.loadLibrary()`, and then by its platform-specific file name through the system loader. */ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) { @@ -37,21 +39,26 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); - try - { - System.loadLibrary(lib); - ret = java.lang.foreign.SymbolLookup.loaderLookup(); - } - catch (UnsatisfiedLinkError e) + if (IS_WINDOWS) + ret = windowsLookup(System.mapLibraryName(lib)); + if (ret == null) { try { - ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); } - catch (IllegalArgumentException e2) + catch (UnsatisfiedLinkError e) { - e.addSuppressed(e2); - throw e; + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } } } LOOKUPS.put(group, ret); @@ -59,6 +66,55 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + { + java.nio.file.Path path = null; + for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) + { + if (dir.isEmpty()) + continue; + java.nio.file.Path candidate = java.nio.file.Path.of(dir, fileName); + if (java.nio.file.Files.isRegularFile(candidate)) + { + path = candidate.toAbsolutePath(); + break; + } + } + if (path == null) + return null; + try + { + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + if (module.address() == 0) + return null; + return name -> + { + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); + } + catch (Throwable e) + { + throw rethrow(e); + } + }; + } + catch (Throwable e) + { + return null; + } + } + /** * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java index e4751704..4095173e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java @@ -26,8 +26,10 @@ private Ffi() {} private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); /** - * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, - * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + * The symbols of the library of a file group. The library is loaded on the first use from `java.library.path` + * (on Windows with `LOAD_WITH_ALTERED_SEARCH_PATH`, so its dependencies are found next to it before anything else: the directory of `java.exe` + * comes first in the default search order, and it has DLLs like `freetype.dll` that can shadow the real ones). + * If that fails, it's loaded with `System.loadLibrary()`, and then by its platform-specific file name through the system loader. */ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) { @@ -37,21 +39,26 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); - try - { - System.loadLibrary(lib); - ret = java.lang.foreign.SymbolLookup.loaderLookup(); - } - catch (UnsatisfiedLinkError e) + if (IS_WINDOWS) + ret = windowsLookup(System.mapLibraryName(lib)); + if (ret == null) { try { - ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); } - catch (IllegalArgumentException e2) + catch (UnsatisfiedLinkError e) { - e.addSuppressed(e2); - throw e; + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } } } LOOKUPS.put(group, ret); @@ -59,6 +66,55 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + { + java.nio.file.Path path = null; + for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) + { + if (dir.isEmpty()) + continue; + java.nio.file.Path candidate = java.nio.file.Path.of(dir, fileName); + if (java.nio.file.Files.isRegularFile(candidate)) + { + path = candidate.toAbsolutePath(); + break; + } + } + if (path == null) + return null; + try + { + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + if (module.address() == 0) + return null; + return name -> + { + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); + } + catch (Throwable e) + { + throw rethrow(e); + } + }; + } + catch (Throwable e) + { + return null; + } + } + /** * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java index 546a4580..9a6954cd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java @@ -26,8 +26,10 @@ private Ffi() {} private static final java.util.Map LOOKUPS = new java.util.HashMap<>(); /** - * The symbols of the library of a file group. The library is loaded on the first use with `System.loadLibrary()`, - * so it's searched in `java.library.path`. If that fails, it's loaded by its platform-specific file name through the system loader. + * The symbols of the library of a file group. The library is loaded on the first use from `java.library.path` + * (on Windows with `LOAD_WITH_ALTERED_SEARCH_PATH`, so its dependencies are found next to it before anything else: the directory of `java.exe` + * comes first in the default search order, and it has DLLs like `freetype.dll` that can shadow the real ones). + * If that fails, it's loaded with `System.loadLibrary()`, and then by its platform-specific file name through the system loader. */ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) { @@ -37,21 +39,26 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); - try - { - System.loadLibrary(lib); - ret = java.lang.foreign.SymbolLookup.loaderLookup(); - } - catch (UnsatisfiedLinkError e) + if (IS_WINDOWS) + ret = windowsLookup(System.mapLibraryName(lib)); + if (ret == null) { try { - ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + System.loadLibrary(lib); + ret = java.lang.foreign.SymbolLookup.loaderLookup(); } - catch (IllegalArgumentException e2) + catch (UnsatisfiedLinkError e) { - e.addSuppressed(e2); - throw e; + try + { + ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); + } + catch (IllegalArgumentException e2) + { + e.addSuppressed(e2); + throw e; + } } } LOOKUPS.put(group, ret); @@ -59,6 +66,55 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + { + java.nio.file.Path path = null; + for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) + { + if (dir.isEmpty()) + continue; + java.nio.file.Path candidate = java.nio.file.Path.of(dir, fileName); + if (java.nio.file.Files.isRegularFile(candidate)) + { + path = candidate.toAbsolutePath(); + break; + } + } + if (path == null) + return null; + try + { + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + if (module.address() == 0) + return null; + return name -> + { + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); + } + catch (Throwable e) + { + throw rethrow(e); + } + }; + } + catch (Throwable e) + { + return null; + } + } + /** * Creates the downcall handle of a C function. C `long` parameters and return values are widened to Java `long`. * If the library lacks the function, the handle throws `UnsatisfiedLinkError` when called, so the other functions of its class stay usable. From 34f745d4489905b5eabea94a868990593e4c825f Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 15:37:16 +0300 Subject: [PATCH 06/10] Java: report the Windows error code when the library can't be loaded LoadLibraryExW failures were swallowed and only the generic message of the System.loadLibrary fallback was visible. Also keep the message when the static initializer of Ffi fails, since the later uses of the class only see a NoClassDefFoundError. Co-Authored-By: Claude Fable 5.1 --- src/generators/java/generator.cpp | 68 ++++++++++++++++++------------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp index 58fe6164..1aad0d64 100644 --- a/src/generators/java/generator.cpp +++ b/src/generators/java/generator.cpp @@ -882,8 +882,18 @@ public abstract class CppStruct implements Native String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + Throwable windowsError = null; if (IS_WINDOWS) - ret = windowsLookup(System.mapLibraryName(lib)); + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } if (ret == null) { try @@ -893,6 +903,8 @@ public abstract class CppStruct implements Native } catch (UnsatisfiedLinkError e) { + if (windowsError != null) + e.addSuppressed(windowsError); try { ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); @@ -909,8 +921,8 @@ public abstract class CppStruct implements Native return ret; } - // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. - private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there, throws if it can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) throws Throwable { java.nio.file.Path path = null; for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) @@ -926,36 +938,34 @@ public abstract class CppStruct implements Native } if (path == null) return null; - try + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.foreign.Linker.Option errorState = java.lang.foreign.Linker.Option.captureCallState("GetLastError"); + java.lang.foreign.StructLayout errorLayout = java.lang.foreign.Linker.Option.captureStateLayout(); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT), errorState); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + int error; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + java.lang.foreign.MemorySegment state = arena.allocate(errorLayout); + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(state, arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + error = state.get(java.lang.foreign.ValueLayout.JAVA_INT, errorLayout.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("GetLastError"))); + } + if (module.address() == 0) + throw new UnsatisfiedLinkError("LoadLibraryExW failed for `" + path + "` with the Windows error " + error + (error == 127 ? ": a procedure is missing from one of its dependencies. A DLL of the same name that's already loaded (such as the C++ runtime bundled with the JDK, which java.exe loads first) can be older than the one the library needs" : "") + "."); + return name -> { - java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); - java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); - java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - java.lang.foreign.MemorySegment module; try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) { - final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; - module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); } - if (module.address() == 0) - return null; - return name -> + catch (Throwable e) { - try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) - { - java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); - return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); - } - catch (Throwable e) - { - throw rethrow(e); - } - }; - } - catch (Throwable e) - { - return null; - } + throw rethrow(e); + } + }; } /** @@ -1131,7 +1141,7 @@ public abstract class CppStruct implements Native ffi += " java.lang.invoke.MethodHandle handler = java.lang.invoke.MethodHandles.lookup().findStatic(Ffi.class, \"exceptionHandler\", java.lang.invoke.MethodType.methodType(void.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class));\n"; ffi += " java.lang.foreign.MemorySegment stub = LINKER.upcallStub(handler, java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS), java.lang.foreign.Arena.global());\n"; ffi += " downcall(\"\", \"" + hp + "SetExceptionHandler\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)).invokeExact(stub, java.lang.foreign.MemorySegment.NULL);\n"; - ffi += " }\n catch (Throwable e)\n {\n throw new ExceptionInInitializerError(e);\n }\n }\n\n"; + ffi += " }\n catch (Throwable e)\n {\n // The message survives the `NoClassDefFoundError` that the later uses of this class get.\n throw new IllegalStateException(\"Failed to register the C++ exception handler: \" + e, e);\n }\n }\n\n"; ffi += " /** Throws if the last call into the C bindings threw a C++ exception. */\n"; ffi += " public static void checkException()\n {\n"; ffi += " String message = PENDING_EXCEPTION.get();\n"; From 21ccd23da2c44164ecd0bfe34764ae25267448fe Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 19:14:41 +0300 Subject: [PATCH 07/10] Java: regenerate the test outputs for the Windows loader diagnostics Co-Authored-By: Claude Fable 5.1 --- test/output_java/src/mrbind_test/Ffi.java | 69 +++++++++++-------- .../src/mrbind_test/Ffi.java | 66 ++++++++++-------- .../src/mrbind_test/Ffi.java | 66 ++++++++++-------- 3 files changed, 116 insertions(+), 85 deletions(-) diff --git a/test/output_java/src/mrbind_test/Ffi.java b/test/output_java/src/mrbind_test/Ffi.java index 2ff4eab2..aa63fc6b 100644 --- a/test/output_java/src/mrbind_test/Ffi.java +++ b/test/output_java/src/mrbind_test/Ffi.java @@ -39,8 +39,18 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + Throwable windowsError = null; if (IS_WINDOWS) - ret = windowsLookup(System.mapLibraryName(lib)); + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } if (ret == null) { try @@ -50,6 +60,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) } catch (UnsatisfiedLinkError e) { + if (windowsError != null) + e.addSuppressed(windowsError); try { ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); @@ -66,8 +78,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } - // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. - private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there, throws if it can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) throws Throwable { java.nio.file.Path path = null; for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) @@ -83,36 +95,34 @@ private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) } if (path == null) return null; - try + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.foreign.Linker.Option errorState = java.lang.foreign.Linker.Option.captureCallState("GetLastError"); + java.lang.foreign.StructLayout errorLayout = java.lang.foreign.Linker.Option.captureStateLayout(); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT), errorState); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + int error; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + java.lang.foreign.MemorySegment state = arena.allocate(errorLayout); + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(state, arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + error = state.get(java.lang.foreign.ValueLayout.JAVA_INT, errorLayout.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("GetLastError"))); + } + if (module.address() == 0) + throw new UnsatisfiedLinkError("LoadLibraryExW failed for `" + path + "` with the Windows error " + error + (error == 127 ? ": a procedure is missing from one of its dependencies. A DLL of the same name that's already loaded (such as the C++ runtime bundled with the JDK, which java.exe loads first) can be older than the one the library needs" : "") + "."); + return name -> { - java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); - java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); - java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - java.lang.foreign.MemorySegment module; try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) { - final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; - module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); } - if (module.address() == 0) - return null; - return name -> + catch (Throwable e) { - try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) - { - java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); - return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); - } - catch (Throwable e) - { - throw rethrow(e); - } - }; - } - catch (Throwable e) - { - return null; - } + throw rethrow(e); + } + }; } /** @@ -297,7 +307,8 @@ private static void exceptionHandler(java.lang.foreign.MemorySegment messages, j } catch (Throwable e) { - throw new ExceptionInInitializerError(e); + // The message survives the `NoClassDefFoundError` that the later uses of this class get. + throw new IllegalStateException("Failed to register the C++ exception handler: " + e, e); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java index 4095173e..c4d2bfe5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java @@ -39,8 +39,18 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + Throwable windowsError = null; if (IS_WINDOWS) - ret = windowsLookup(System.mapLibraryName(lib)); + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } if (ret == null) { try @@ -50,6 +60,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) } catch (UnsatisfiedLinkError e) { + if (windowsError != null) + e.addSuppressed(windowsError); try { ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); @@ -66,8 +78,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } - // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. - private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there, throws if it can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) throws Throwable { java.nio.file.Path path = null; for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) @@ -83,36 +95,34 @@ private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) } if (path == null) return null; - try + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.foreign.Linker.Option errorState = java.lang.foreign.Linker.Option.captureCallState("GetLastError"); + java.lang.foreign.StructLayout errorLayout = java.lang.foreign.Linker.Option.captureStateLayout(); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT), errorState); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + int error; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + java.lang.foreign.MemorySegment state = arena.allocate(errorLayout); + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(state, arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + error = state.get(java.lang.foreign.ValueLayout.JAVA_INT, errorLayout.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("GetLastError"))); + } + if (module.address() == 0) + throw new UnsatisfiedLinkError("LoadLibraryExW failed for `" + path + "` with the Windows error " + error + (error == 127 ? ": a procedure is missing from one of its dependencies. A DLL of the same name that's already loaded (such as the C++ runtime bundled with the JDK, which java.exe loads first) can be older than the one the library needs" : "") + "."); + return name -> { - java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); - java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); - java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - java.lang.foreign.MemorySegment module; try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) { - final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; - module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); } - if (module.address() == 0) - return null; - return name -> + catch (Throwable e) { - try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) - { - java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); - return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); - } - catch (Throwable e) - { - throw rethrow(e); - } - }; - } - catch (Throwable e) - { - return null; - } + throw rethrow(e); + } + }; } /** diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java index 9a6954cd..21a531ef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java @@ -39,8 +39,18 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) String lib = LIB_NAMES.get(group); if (lib == null) throw new IllegalArgumentException("Unknown library group: `" + group + "`."); + Throwable windowsError = null; if (IS_WINDOWS) - ret = windowsLookup(System.mapLibraryName(lib)); + { + try + { + ret = windowsLookup(System.mapLibraryName(lib)); + } + catch (Throwable e) + { + windowsError = e; + } + } if (ret == null) { try @@ -50,6 +60,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) } catch (UnsatisfiedLinkError e) { + if (windowsError != null) + e.addSuppressed(windowsError); try { ret = java.lang.foreign.SymbolLookup.libraryLookup(System.mapLibraryName(lib), java.lang.foreign.Arena.global()); @@ -66,8 +78,8 @@ public static synchronized java.lang.foreign.SymbolLookup lookup(String group) return ret; } - // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there or can't be loaded. - private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) + // Loads a DLL found in `java.library.path` with `LoadLibraryExW()`, see `lookup()`. Returns null if it's not there, throws if it can't be loaded. + private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) throws Throwable { java.nio.file.Path path = null; for (String dir : System.getProperty("java.library.path", "").split(java.io.File.pathSeparator)) @@ -83,36 +95,34 @@ private static java.lang.foreign.SymbolLookup windowsLookup(String fileName) } if (path == null) return null; - try + java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); + java.lang.foreign.Linker.Option errorState = java.lang.foreign.Linker.Option.captureCallState("GetLastError"); + java.lang.foreign.StructLayout errorLayout = java.lang.foreign.Linker.Option.captureStateLayout(); + java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT), errorState); + java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + java.lang.foreign.MemorySegment module; + int error; + try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) + { + final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; + java.lang.foreign.MemorySegment state = arena.allocate(errorLayout); + module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(state, arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + error = state.get(java.lang.foreign.ValueLayout.JAVA_INT, errorLayout.byteOffset(java.lang.foreign.MemoryLayout.PathElement.groupElement("GetLastError"))); + } + if (module.address() == 0) + throw new UnsatisfiedLinkError("LoadLibraryExW failed for `" + path + "` with the Windows error " + error + (error == 127 ? ": a procedure is missing from one of its dependencies. A DLL of the same name that's already loaded (such as the C++ runtime bundled with the JDK, which java.exe loads first) can be older than the one the library needs" : "") + "."); + return name -> { - java.lang.foreign.SymbolLookup kernel32 = java.lang.foreign.SymbolLookup.libraryLookup("kernel32.dll", java.lang.foreign.Arena.global()); - java.lang.invoke.MethodHandle loadLibraryEx = LINKER.downcallHandle(kernel32.find("LoadLibraryExW").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); - java.lang.invoke.MethodHandle getProcAddress = LINKER.downcallHandle(kernel32.find("GetProcAddress").orElseThrow(), java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - java.lang.foreign.MemorySegment module; try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) { - final int LOAD_WITH_ALTERED_SEARCH_PATH = 0x8; - module = (java.lang.foreign.MemorySegment)loadLibraryEx.invokeExact(arena.allocateFrom(path.toString(), java.nio.charset.StandardCharsets.UTF_16LE), java.lang.foreign.MemorySegment.NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); + return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); } - if (module.address() == 0) - return null; - return name -> + catch (Throwable e) { - try (java.lang.foreign.Arena arena = java.lang.foreign.Arena.ofConfined()) - { - java.lang.foreign.MemorySegment address = (java.lang.foreign.MemorySegment)getProcAddress.invokeExact(module, arena.allocateFrom(name)); - return address.address() == 0 ? java.util.Optional.empty() : java.util.Optional.of(address); - } - catch (Throwable e) - { - throw rethrow(e); - } - }; - } - catch (Throwable e) - { - return null; - } + throw rethrow(e); + } + }; } /** From 66a66d4e85369d2c0763b1c745b45e158b1165ee Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 20:20:01 +0300 Subject: [PATCH 08/10] Java: casts, lambdas for std::function, lifetime-based owners, examples, no generated-code headers The same five points as in the Rust backend: the "generated, do not edit" headers are gone; the [[clang::lifetimebound]] relations choose what a returned reference keeps alive; every class gets upcastTo(), and staticDowncastFrom() / dynamicDowncastFrom() for the non-virtual and polymorphic bases, calling the cast functions of the C bindings; the std::function wrappers get of(lambda) and assignFn(lambda), built on ConstructEx/AssignEx through upcall stubs, with the lambda shared by the copies and its exceptions rethrown by the wrapper that called into C; examples/java is the same as examples/rust. A class can't be named like a segment of the base package anymore, the example found that case (example.h in package example). Co-Authored-By: Claude Fable 5.1 --- .gitignore | 3 + docs/generating_java.md | 12 +- examples/README.md | 10 + examples/java/clean.sh | 6 + examples/java/example_consumer/Main.java | 11 + examples/java/run.sh | 121 +++++++ src/generators/java/generator.cpp | 430 +++++++++++++++++++++-- src/generators/java/generator.h | 10 + test/run_java/Main.java | 47 +++ 9 files changed, 623 insertions(+), 27 deletions(-) create mode 100644 examples/java/clean.sh create mode 100644 examples/java/example_consumer/Main.java create mode 100644 examples/java/run.sh diff --git a/.gitignore b/.gitignore index 3067034c..63f414d5 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,8 @@ parallel-hashmap/ /examples/rust/library/Cargo.lock /examples/rust/example_consumer/target /examples/rust/example_consumer/Cargo.lock +/examples/java/c_library +/examples/java/library +/examples/java/example_consumer/classes /examples/python/pybind11 /examples/python/output diff --git a/docs/generating_java.md b/docs/generating_java.md index ff592127..4fb5b72d 100644 --- a/docs/generating_java.md +++ b/docs/generating_java.md @@ -67,7 +67,7 @@ The runtime support classes live in the base package: `Ffi` (library loading, th The wrappers: -* Classes that need to live on the heap are opaque, their wrappers hold a pointer. A wrapper created by a constructor or returned by value *owns* the C++ object: it's destroyed when the wrapper is garbage-collected (through `java.lang.ref.Cleaner`), or earlier when `close()` is called (the wrappers are `AutoCloseable`, so `try (var mesh = ...)` works). A wrapper returned by reference doesn't own the object, and keeps the wrapper it was obtained from alive, so the reference doesn't dangle. +* Classes that need to live on the heap are opaque, their wrappers hold a pointer. A wrapper created by a constructor or returned by value *owns* the C++ object: it's destroyed when the wrapper is garbage-collected (through `java.lang.ref.Cleaner`), or earlier when `close()` is called (the wrappers are `AutoCloseable`, so `try (var mesh = ...)` works). A wrapper returned by reference doesn't own the object, and keeps alive what the reference points into, so it doesn't dangle: the objects named by the `[[clang::lifetimebound]]` annotations (and by the lifetimes the C generator infers, e.g. for field getters), or without annotations `this` for methods and the only object parameter for free functions. * Parameters take wrappers: `const T &`, `T &` and by-value copies all take a `T`. Pointers and parameters with default arguments are nullable, `null` passes a null pointer or asks for the default argument. `std::optional` parameters are nullable too. Passing a non-copyable class by value moves from the wrapper, which can't be used after that (see `CppObject.release()`). @@ -79,7 +79,11 @@ The wrappers: * The structs exposed with `--expose-as-struct` are views over native memory with the C++ layout: the fields are accessed in place with `x()`/`setX()` (arrays with an index), `copy()` makes an independent copy, `set()` overwrites the contents. Instances created in Java own their memory, those returned by reference point into the memory of their owner. The layout is built at runtime with the C alignment rules, and checked against the sizes the C bindings were generated with when the struct has no platform-sized fields. -* Functions that the safe layer doesn't understand (callbacks, `std::shared_ptr`, arrays of unknown bound, ...) are still generated, but take and return raw `MemorySegment`s and primitives. The doc comment of each wrapper names the C function it calls, so the C bindings documentation applies. +* A class with bases gets `upcastTo()`, `staticDowncastFrom(base)` for the non-virtual bases (undefined behavior if the object isn't actually of the derived class), and `dynamicDowncastFrom(base)` for the polymorphic ones (returns null if it isn't). Those call the cast functions of the C bindings, and the results are references to the object that was cast. + +* `std::function` parameters take the `std_function_...` wrapper class, which you construct from a Java lambda with `of(lambda)` (or replace with `assignFn()`). The lambda implements the nested `Fn` interface: it receives scalars and enums by value, exposed structs by value (as copies), and classes by reference, and returns scalars by value or classes by value (an owned wrapper, which the C++ side takes over). The copies of the `std::function` share the lambda. An exception thrown by the lambda is rethrown by the wrapper that called into C, once the C call returns. Callback parameters the generator doesn't understand are raw `MemorySegment`s in `Fn`. + +* Functions that the safe layer doesn't understand (`std::shared_ptr`, arrays of unknown bound, ...) are still generated, but take and return raw `MemorySegment`s and primitives. The doc comment of each wrapper names the C function it calls, so the C bindings documentation applies. Overloaded functions keep their names as long as their Java parameter types differ. Those that would clash get the disambiguated names of their C functions (e.g. `boolean_4_const_MR_Mesh_ref`). Constructors become Java constructors on the same condition, else static factories. Overloaded operators are `opAdd`, `opEqual`, `opNotEqual`, `opAddAssign`, etc. @@ -89,7 +93,7 @@ C++ exceptions are caught by the C bindings (unless the C generator ran with `-- This backend is as young as the Rust one, and shares its limitations: -* Inherited members are only available if the C generator copied them (`--copy-inherited-members`); there are no conversions between a class and its bases. -* `std::function` parameters take raw function pointers. +* Inherited members are only available if the C generator copied them (`--copy-inherited-members`). Otherwise upcast to the base explicitly to call its methods, there are no implicit conversions. * Containers only expose the methods that the C bindings have (`size()`, `at()`, ...), there's no `Iterable` or `List` integration yet. * Output parameters of scalar types (`int &`) are raw. +* Objects don't keep alive what they reference (the `[[clang::lifetime_capture_by]]` annotations), the doc comments only mention it. A reference parameter that gets stored must outlive the object. diff --git a/examples/README.md b/examples/README.md index 13b44dab..9a1718d6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -44,6 +44,16 @@ It parses all C++ headers in `examples/input` and generates the Rust crate in ` Then it runs the test executable at `examples/rust/example_consumer`, which calls into this library. +## Java + +You need to have a JDK 22 or newer installed (`javac` and `java` in `PATH`, or `JAVA_HOME` set). + +Run `examples/java/run.sh`. + +It parses all C++ headers in `examples/input` and generates the Java sources in `examples/java/library/src`, which it compiles into `examples/java/library/example.jar`. It also generates the C bindings required for Java, like the C example, in `examples/java/c_library`. + +Then it runs the test program at `examples/java/example_consumer`, which calls into this library. + ## Python Run `examples/python/run.sh`. diff --git a/examples/java/clean.sh b/examples/java/clean.sh new file mode 100644 index 00000000..e43ae71f --- /dev/null +++ b/examples/java/clean.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +SCRIPT_DIR="$(dirname "$BASH_SOURCE")" +cd "$SCRIPT_DIR/.." + +rm -rf java/c_library java/library java/example_consumer/classes diff --git a/examples/java/example_consumer/Main.java b/examples/java/example_consumer/Main.java new file mode 100644 index 00000000..9fad06f7 --- /dev/null +++ b/examples/java/example_consumer/Main.java @@ -0,0 +1,11 @@ +import example.example.Functions; + +public class Main +{ + public static void main(String[] args) + { + Functions.SayHello(); + if (Functions.Square(4) != 16) + throw new AssertionError("Square(4) != 16"); + } +} diff --git a/examples/java/run.sh b/examples/java/run.sh new file mode 100644 index 00000000..12248865 --- /dev/null +++ b/examples/java/run.sh @@ -0,0 +1,121 @@ +#!/bin/bash + +SCRIPT_DIR="$(dirname "$BASH_SOURCE")" +cd "$SCRIPT_DIR/.." + +. _detail/set_env_vars.sh + +./java/clean.sh + +mkdir -p java/c_library/tmp + +# Those are the Clang-style flags for the parser. +EXTRA_PARSER_CXX_FLAGS=( + -std=c++20 -Wall -Wextra -pedantic-errors + -fparse-all-comments +) + +# Those are optional tunable flags for the parser. +EXTRA_PARSER_FLAGS=( +) + +# Those are optional tunable flags for the C generator. +EXTRA_GEN_C_FLAGS=( + --max-header-name-length 100 +) + +# Those are optional tunable flags for the Java generator. +EXTRA_GEN_FLAGS=( +) + +# Those are optional tunable flags for the C bindings compilation. +EXTRA_CXX_FLAGS=( + -g +) + +# The JDK tools, from `JAVA_HOME` if it's set. Java 22 or newer is required. +JAVA_BIN="${JAVA_HOME:+$JAVA_HOME/bin/}" + +SHARED_LIBRARY_EXT=.so +SHARED_LIBRARY_PREFIX=lib +CLASSPATH_SEP=: + +# Need extra flags on MSYS2. +if [[ $(uname -o) == Msys ]]; then + EXTRA_PARSER_CXX_FLAGS+=(--sysroot="$MSYSTEM_PREFIX") + SHARED_LIBRARY_EXT=.dll + SHARED_LIBRARY_PREFIX= + CLASSPATH_SEP=';' +fi + +set -x + +# Assemble the combined input header. +echo "#pragma once" >java/c_library/tmp/combined_input.h +find input \( -name '*.h' -or -name '*.hpp' \) -printf "#include <%p>\n" >>java/c_library/tmp/combined_input.h + +# Parse the input header. +../build/mrbind \ + java/c_library/tmp/combined_input.h \ + -o java/c_library/tmp/parse_result.json \ + --ignore :: \ + --allow Example \ + --copy-inherited-members \ + "${EXTRA_PARSER_FLAGS[@]}" \ + -- \ + -xc++-header \ + -resource-dir="${CLANG_RESOURCE_DIR:-$("$CLANG_CXX" -print-resource-dir)}" \ + -I. \ + "${EXTRA_PARSER_CXX_FLAGS[@]}" + +# Generate the C bindings, required by the Java bindings. +../build/mrbind_gen_c \ + --input java/c_library/tmp/parse_result.json \ + --output-header-dir java/c_library/include \ + --output-source-dir java/c_library/src \ + --output-desc-json java/c_library/tmp/c_desc.json \ + --helper-name-prefix Example_ \ + --helper-macro-name-prefix EXAMPLE_ \ + --map-path input . \ + --assume-include-dir . \ + --force-emit-common-helpers \ + "${EXTRA_GEN_C_FLAGS[@]}" + +# Generate the Java bindings. +../build/mrbind_gen_java \ + --input-json java/c_library/tmp/c_desc.json \ + --output-dir java/library/src \ + --package example \ + --imported-lib-name example \ + --force-namespace Example \ + "${EXTRA_GEN_FLAGS[@]}" + +# Compile the Java bindings into a jar. The list of sources goes through a file, since there can be a lot of them. +find java/library/src -name '*.java' >java/library/sources.txt +"${JAVA_BIN}javac" --release 22 -Xlint:all -Werror -d java/library/classes @java/library/sources.txt +"${JAVA_BIN}jar" --create --file java/library/example.jar -C java/library/classes . + +# Find the generated source files of the C bindings. +# Those are C++ sources. Only the generated headers are C. +SOURCES="$(find java/c_library/src -name *.cpp)" + +# Compile the C bindings into a library. Using the Java bindings loads this library at runtime. +if [[ $SOURCES ]]; then + # The C bindings can be compiled with any C++ compiler, not necessarily Clang. + "$CLANG_CXX" \ + -std=c++20 -Wall -Wextra -pedantic-errors \ + -Ijava/c_library/include \ + -Ijava/c_library/src \ + -I. \ + $SOURCES \ + -shared -fPIC \ + -fvisibility=hidden -fvisibility-inlines-hidden \ + -o java/c_library/${SHARED_LIBRARY_PREFIX}example$SHARED_LIBRARY_EXT \ + "${EXTRA_CXX_FLAGS[@]}" +else + echo "The generator didn't produce any source files that need to be compiled." +fi + +# Compile and run a test program. The C bindings library is found in `java.library.path`. +"${JAVA_BIN}javac" --release 22 -Xlint:all -Werror -cp java/library/example.jar -d java/example_consumer/classes java/example_consumer/Main.java +"${JAVA_BIN}java" --enable-native-access=ALL-UNNAMED -Djava.library.path=java/c_library -cp "java/library/example.jar${CLASSPATH_SEP}java/example_consumer/classes" Main diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp index 1aad0d64..ab6ec3e4 100644 --- a/src/generators/java/generator.cpp +++ b/src/generators/java/generator.cpp @@ -187,6 +187,8 @@ namespace mrbind::Java iter->second.package = m->package + "." + name; iter->second.dir = m->dir + "/" + name; iter->second.used_names.insert("Functions"); // The holder of the free functions. + for (const auto &segment : base_package_segments) + iter->second.used_names.insert(segment); } m = &iter->second; } @@ -475,6 +477,13 @@ namespace mrbind::Java root.used_names.insert("Functions"); for (std::string_view name : {"Ffi", "Native", "CppObject", "CppStruct", "CppException"}) root.used_names.insert(std::string(name)); + // A class named like a segment of the base package would shadow the package in the qualified names inside of it. + Strings::Split(base_package, ".", [&](std::string_view segment) + { + base_package_segments.push_back(std::string(segment)); + root.used_names.insert(std::string(segment)); + return false; + }); // First pass: register all names, so that nested classes can find their enclosing classes. for (const auto &cpp_name : c_desc.cpp_types.Vec()) @@ -698,16 +707,282 @@ namespace mrbind::Java AddHandle(*info.file, c_name, "static final java.lang.invoke.MethodHandle " + JavaIdent(c_name) + " = " + RuntimeClass("Ffi") + ".downcall(\"\", \"" + c_name + "\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS));\n"); info.destroy_handle = handle_paths.at(c_name); } + + // The casts, which the description doesn't list. The names mirror what the C generator emits. + auto AddSimple = [&](const std::string &c_name, std::size_t num_ptr_args, bool returns_ptr) + { + std::string desc = returns_ptr ? "java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS" : "java.lang.foreign.FunctionDescriptor.ofVoid("; + for (std::size_t i = 0; i < num_ptr_args; i++) + desc += (returns_ptr || i > 0 ? ", " : "") + std::string("java.lang.foreign.ValueLayout.ADDRESS"); + desc += ")"; + AddHandle(*info.file, c_name, "static final java.lang.invoke.MethodHandle " + JavaIdent(c_name) + " = " + RuntimeClass("Ffi") + ".downcall(\"\", \"" + c_name + "\", " + desc + ");\n"); + }; + ForEachCastBase(info, [&](const TypeInfo &base, CInterop::InheritanceInfo::Kind kind) + { + AddSimple(info.c_name + "_MutableUpcastTo_" + base.c_name, 1, true); + if (kind == CInterop::InheritanceInfo::Kind::non_virt) + AddSimple(info.c_name + "_MutableStaticDowncastFrom_" + base.c_name, 1, true); + if (base.class_desc->is_polymorphic) + AddSimple(info.c_name + "_MutableDynamicDowncastFrom_" + base.c_name, 1, true); + }); + if (cl.std_function && info.has_destroy) + { + AddSimple(info.c_name + "_ConstructEx", 4, true); + AddSimple(info.c_name + "_AssignEx", 5, false); + } } } + void Generator::ForEachCastBase(const TypeInfo &info, const std::function &func) const + { + // This mirrors what the C generator emits: casts to all the bases up to the first ambiguous one, + // static downcasts from the non-virtual bases, dynamic downcasts from the polymorphic bases. + const auto &inh = info.class_desc->inheritance_info; + for (const std::string &base_cpp : inh.bases_indirect.Vec()) + { + const auto kind = inh.bases_indirect.Map().at(base_cpp); + if (kind == CInterop::InheritanceInfo::Kind::ambiguous) + break; + auto iter = types_by_cpp_name.find(base_cpp); + if (iter == types_by_cpp_name.end() || !iter->second.class_desc) + continue; + func(iter->second, kind); + } + } + + void Generator::EmitCasts(const TypeInfo &info, std::string &members, std::set &used_keys) + { + const std::string F = RuntimeClass("Ffi"); + const std::string MS(kMemorySegment); + + // A non-owning wrapper around a pointer returned by a cast. + auto WrapRef = [&](const TypeInfo &t, const std::string &owner) + { + if (t.IsExposedStruct()) + return "new " + t.java_path + "(__ret.reinterpret(" + t.java_path + ".LAYOUT.byteSize()), " + owner + ")"; + return "new " + t.java_path + "(__ret, " + (t.has_destroy ? "false, " : "") + owner + ")"; + }; + auto UniqueMethod = [&](std::string name, const std::string &sig) + { + std::string base = name; + for (int i = 2; !used_keys.insert(name + "(" + sig + ")").second; i++) + name = base + "_" + std::to_string(i); + return name; + }; + auto Method = [&](const std::string &doc, const std::string &head, const std::string &c_name, const std::string &arg, const std::string &result, const std::string &fence) + { + members += "/** " + doc + "\n *\n * Calls `" + c_name + "()`. */\n"; + members += head + "\n{\n try\n {\n"; + members += " " + MS + " __ret = (" + MS + ")" + handle_paths.at(c_name) + ".invokeExact(" + arg + ");\n"; + members += " return " + result + ";\n"; + members += " }\n catch (java.lang.Throwable __e)\n {\n throw " + F + ".rethrow(__e);\n }\n"; + members += " finally\n {\n java.lang.ref.Reference.reachabilityFence(" + fence + ");\n }\n}\n\n"; + }; + + ForEachCastBase(info, [&](const TypeInfo &base, CInterop::InheritanceInfo::Kind kind) + { + const std::string suffix = Capitalize(base.java_unqual); + std::string name = UniqueMethod("upcastTo" + suffix, ""); + Method("Upcasts to the base class `" + base.cpp_name + "`. The result refers to this object.", + "public " + base.java_path + " " + name + "()", info.c_name + "_MutableUpcastTo_" + base.c_name, "rawPointer()", WrapRef(base, "this"), "this"); + if (kind == CInterop::InheritanceInfo::Kind::non_virt) + { + name = UniqueMethod("staticDowncastFrom" + suffix, base.java_path); + Method("Static downcast from the base class `" + base.cpp_name + "`. Undefined behavior if the object isn't actually a `" + info.java_unqual + "`. The result refers to `object`.", + "public static " + info.java_path + " " + name + "(" + base.java_path + " object)", info.c_name + "_MutableStaticDowncastFrom_" + base.c_name, F + ".ptrNonNull(object, \"object\")", WrapRef(info, "object"), "object"); + } + if (base.class_desc->is_polymorphic) + { + name = UniqueMethod("dynamicDowncastFrom" + suffix, base.java_path); + Method("Dynamic downcast from the base class `" + base.cpp_name + "`. Returns null if the object isn't actually a `" + info.java_unqual + "`. The result refers to `object`.", + "public static " + info.java_path + " " + name + "(" + base.java_path + " object)", info.c_name + "_MutableDynamicDowncastFrom_" + base.c_name, F + ".ptrNonNull(object, \"object\")", "__ret.address() == 0 ? null : " + WrapRef(info, "object"), "object"); + } + }); + } + + void Generator::EmitStdFunction(const TypeInfo &info, std::string &members, std::set &used_keys) + { + const auto &sf = *info.class_desc->std_function; + const std::string F = RuntimeClass("Ffi"); + const std::string MS(kMemorySegment); + const std::string ctor_c_name = info.c_name + "_ConstructEx"; + const std::string assign_c_name = info.c_name + "_AssignEx"; + if (!handle_paths.contains(ctor_c_name) || !handle_paths.contains(assign_c_name)) + return; + + // The C callback: `R (*)(args..., [out params], void *_userdata, void **_cleanup_value)`. + const cppdecl::Type &type = ParseTypeOrThrow(sf.stateful_func_c_type); + const cppdecl::Function *fn = type.As(1); + if (!fn || fn->params.size() < 2) + return; + cppdecl::Type ret_c = type; + ret_c.modifiers.erase(ret_c.modifiers.begin(), ret_c.modifiers.begin() + 2); + auto ret_type = CTypeToJava(ret_c); + if (!ret_type || ret_type->is_c_long) + return; + + struct Arg + { + std::string name; + JavaType c_type; + std::string fn_type; // The parameter type of the Java callable, empty for the parameters it doesn't see. + std::string convert; // An expression in terms of `name`. + }; + std::vector args; + std::string ret_fn_type = ret_type->java; + std::string ret_convert; // Statements, `__ret` holds the result of the Java callable. + std::string default_ret; // What the trampoline returns if the callable throws. + bool returns_class = false; + const std::string pass_by = c_desc.helpers_prefix + "PassBy"; + + auto DefaultOf = [&](const std::string &java_type) -> std::string + { + if (java_type == "void") return ""; + if (java_type == "boolean") return "false"; + if (java_type == "float") return "0f"; + if (java_type == "double") return "0.0"; + if (java_type == MS) return MS + ".NULL"; + return "0"; + }; + + for (std::size_t i = 0; i + 2 < fn->params.size(); i++) + { + const auto ¶m = fn->params[i]; + const std::string name = param.name.AsSingleWord().empty() ? "_" + std::to_string(i + 1) : std::string(param.name.AsSingleWord()); + auto c_type = CTypeToJava(param.type); + if (!c_type || c_type->java == "void" || c_type->is_c_long) + return; + + if (name.starts_with("_return")) + { + // The output parameters of the return value. We only understand a class returned by value. + if (name != "_return_pass_by" || i != 0 || param.type.modifiers.size() != 1 || !param.type.Is() || cppdecl::ToCode(param.type.simple_type.name, {}) != pass_by) + return; + if (ret_c.modifiers.size() != 1 || !ret_c.Is() || ret_c.IsConst(1)) + return; + auto iter = types_by_c_name.find(cppdecl::ToCode(ret_c.simple_type.name, {})); + if (iter == types_by_c_name.end() || !iter->second->has_destroy) + return; + returns_class = true; + ret_fn_type = iter->second->java_path; + ret_convert = name + ".reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, " + F + ".PASS_BY_MOVE_AND_DESTROY);\nreturn java.util.Objects.requireNonNull(__ret, \"The callback returned null.\").release();\n"; + // On failure the C bindings default-construct the result. + default_ret = MS + ".NULL"; + args.push_back({name, *c_type, "", ""}); + continue; + } + + Arg arg{name, *c_type, c_type->java, name}; + if (param.type.modifiers.empty()) + { + if (c_type->type_info && c_type->type_info->IsEnum()) + { + arg.fn_type = c_type->type_info->java_path; + arg.convert = c_type->type_info->java_path + ".of(" + name + ")"; + } + else if (c_type->type_info && c_type->type_info->IsExposedStruct()) + { + // The segment only lives for the duration of the call, so copy it. + arg.fn_type = c_type->type_info->java_path; + arg.convert = "new " + c_type->type_info->java_path + "(" + F + ".allocStruct(" + c_type->type_info->java_path + ".LAYOUT).copyFrom(" + name + "), null)"; + } + } + else if (param.type.modifiers.size() == 1 && param.type.Is()) + { + auto iter = types_by_c_name.find(cppdecl::ToCode(param.type.simple_type.name, {})); + if (iter != types_by_c_name.end() && iter->second->class_desc) + { + const TypeInfo &t = *iter->second; + arg.fn_type = t.java_path; + if (t.IsExposedStruct()) + arg.convert = name + ".address() == 0 ? null : new " + t.java_path + "(" + name + ".reinterpret(" + t.java_path + ".LAYOUT.byteSize()), null)"; + else + arg.convert = name + ".address() == 0 ? null : new " + t.java_path + "(" + name + ", " + (t.has_destroy ? "false, " : "") + "null)"; + } + } + args.push_back(std::move(arg)); + } + + if (!returns_class) + { + default_ret = DefaultOf(ret_type->java); + if (ret_type->java == "void") + ret_convert = ""; + else if (ret_c.modifiers.empty() && ret_type->type_info && ret_type->type_info->IsEnum()) + { + ret_fn_type = ret_type->type_info->java_path; + ret_convert = "return java.util.Objects.requireNonNull(__ret, \"The callback returned null.\").value;\n"; + } + else if (ret_c.modifiers.empty() && ret_type->type_info && ret_type->type_info->IsExposedStruct()) + { + ret_fn_type = ret_type->type_info->java_path; + ret_convert = "return " + F + ".ptrNonNull(__ret, \"the callback result\");\n"; + } + else + ret_convert = "return __ret;\n"; + } + + // The callable interface, the trampoline, and the construction. + std::string fn_params, call_args, c_params, layouts; + for (const Arg &arg : args) + { + c_params += arg.c_type.java + " " + arg.name + ", "; + layouts += arg.c_type.layout + ", "; + if (arg.fn_type.empty()) + continue; + fn_params += (fn_params.empty() ? "" : ", ") + arg.fn_type + " " + arg.name; + call_args += (call_args.empty() ? "" : ", ") + arg.convert; + } + const std::string desc = ret_type->java == "void" + ? "java.lang.foreign.FunctionDescriptor.ofVoid(" + layouts + "java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)" + : "java.lang.foreign.FunctionDescriptor.of(" + ret_type->layout + ", " + layouts + "java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)"; + + members += "/** A Java callable that an instance can hold, see `of()`. */\n"; + members += "@java.lang.FunctionalInterface\npublic interface Fn\n{\n " + ret_fn_type + " call(" + fn_params + ");\n}\n\n"; + members += "private static final " + MS + " CALL_STUB = " + F + ".upcall(java.lang.invoke.MethodHandles.lookup(), " + info.java_unqual + ".class, \"__call\", " + desc + ");\n\n"; + members += "private static " + ret_type->java + " __call(" + c_params + MS + " _userdata, " + MS + " _cleanup_value)\n{\n"; + members += " Fn func = (Fn)" + F + ".callbackState(_userdata);\n"; + members += " try\n {\n"; + if (ret_fn_type == "void") + members += " func.call(" + call_args + ");\n"; + else + members += " " + ret_fn_type + " __ret = func.call(" + call_args + ");\n"; + members += Indent(ret_convert, 2); + members += " }\n catch (java.lang.Throwable __e)\n {\n " + F + ".callbackFailed(__e);\n"; + if (!default_ret.empty()) + members += " return " + default_ret + ";\n"; + members += " }\n}\n\n"; + + auto UniqueMethod = [&](std::string name, const std::string &sig) + { + std::string base = name; + for (int i = 2; !used_keys.insert(name + "(" + sig + ")").second; i++) + name = base + "_" + std::to_string(i); + return name; + }; + const std::string fn_type = info.java_path + ".Fn"; + const std::string callbacks = "CALL_STUB, " + F + ".newCallbackState(java.util.Objects.requireNonNull(func, \"func\")), " + MS + ".NULL, " + F + ".CALLBACK_STATE_STUB"; + std::string name = UniqueMethod("of", fn_type); + members += "/** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C.\n *\n * Calls `" + ctor_c_name + "()`. */\n"; + members += "public static " + info.java_path + " " + name + "(Fn func)\n{\n try\n {\n"; + members += " " + MS + " __ret = (" + MS + ")" + handle_paths.at(ctor_c_name) + ".invokeExact(" + callbacks + ");\n"; + members += " " + F + ".checkException();\n return new " + info.java_path + "(__ret, true, null);\n"; + members += " }\n catch (java.lang.Throwable __e)\n {\n throw " + F + ".rethrow(__e);\n }\n}\n\n"; + name = UniqueMethod("assignFn", fn_type); + members += "/** Replaces the stored callable with a Java one.\n *\n * Calls `" + assign_c_name + "()`. */\n"; + members += "public void " + name + "(Fn func)\n{\n try\n {\n"; + members += " " + handle_paths.at(assign_c_name) + ".invokeExact(rawPointer(), " + callbacks + ");\n"; + members += " " + F + ".checkException();\n"; + members += " }\n catch (java.lang.Throwable __e)\n {\n throw " + F + ".rethrow(__e);\n }\n finally\n {\n java.lang.ref.Reference.reachabilityFence(this);\n }\n}\n\n"; + } + void Generator::EmitRuntime() { const std::string pkg_line = "package " + base_package + ";\n\n"; const std::string &hp = c_desc.helpers_prefix; // Native. - output_files[root.dir + "/Native.java"] = pkg_line + R"(/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ + output_files[root.dir + "/Native.java"] = pkg_line + R"(/** Implemented by the wrappers of native objects. */ public interface Native { /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ @@ -716,7 +991,7 @@ public interface Native )"; // CppException. - output_files[root.dir + "/CppException.java"] = pkg_line + R"(/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ + output_files[root.dir + "/CppException.java"] = pkg_line + R"(/** A C++ exception thrown by the C bindings. */ public class CppException extends RuntimeException { private static final long serialVersionUID = 1; @@ -727,7 +1002,7 @@ public class CppException extends RuntimeException // CppObject. output_files[root.dir + "/CppObject.java"] = pkg_line + R"(/** - * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * The base class of the wrappers of the opaque C++ classes. * * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), * or is a reference to an object owned by something else. References returned by methods keep their owner alive. @@ -818,7 +1093,7 @@ public abstract class CppObject implements Native, AutoCloseable // CppStruct. output_files[root.dir + "/CppStruct.java"] = pkg_line + R"(/** - * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. * * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), * those returned by reference from the bindings point into memory owned by something else, which they keep alive. @@ -841,7 +1116,7 @@ public abstract class CppStruct implements Native // Ffi. std::string ffi = pkg_line; - ffi += "/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */\n"; + ffi += "/** The runtime support of the bindings. */\n"; ffi += "@SuppressWarnings(\"restricted\") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them.\n"; ffi += "public final class Ffi\n{\n"; ffi += " private Ffi() {}\n\n"; @@ -1122,10 +1397,92 @@ public abstract class CppStruct implements Native } )"; + ffi += R"JAVA( + // What the wrapper must throw once the C call returns: a C++ exception message reported by the C bindings (a String), + // or an exception thrown by a Java callback (a Throwable). Per thread, since the C bindings report per thread. + private static final ThreadLocal PENDING = new ThreadLocal<>(); + + /** Throws if the last call into the C bindings threw a C++ exception, or a Java callback threw. */ + public static void checkException() + { + Object pending = PENDING.get(); + if (pending == null) + return; + PENDING.remove(); + if (pending instanceof Throwable error) + throw rethrow(error); + throw new CppException((String)pending); + } + + /** Called by the callback trampolines when the Java callable throws. The exception is rethrown by the wrapper that made the C call. */ + public static void callbackFailed(Throwable error) + { + if (PENDING.get() == null) + PENDING.set(error); + } + + /** Creates an upcall stub for a static method of `cls`. The lookup must be able to see the method. */ + public static java.lang.foreign.MemorySegment upcall(java.lang.invoke.MethodHandles.Lookup lookup, Class cls, String name, java.lang.foreign.FunctionDescriptor desc) + { + try + { + return LINKER.upcallStub(lookup.findStatic(cls, name, desc.toMethodType()), desc, java.lang.foreign.Arena.global()); + } + catch (ReflectiveOperationException e) + { + throw new IllegalStateException(e); + } + } + + // The Java callables held by the `std::function` instances, keyed by the ids that are passed to C as the user data pointers. + // Each entry is the callable and its reference count: the copies of a `std::function` share the user data. + private static final java.util.concurrent.ConcurrentHashMap CALLBACKS = new java.util.concurrent.ConcurrentHashMap<>(); + private static final java.util.concurrent.atomic.AtomicLong NEXT_CALLBACK_ID = new java.util.concurrent.atomic.AtomicLong(1); + + /** Registers a callable and returns its user data pointer, with one reference. */ + public static java.lang.foreign.MemorySegment newCallbackState(Object callable) + { + long id = NEXT_CALLBACK_ID.getAndIncrement(); + CALLBACKS.put(id, new Object[]{callable, new java.util.concurrent.atomic.AtomicInteger(1)}); + return java.lang.foreign.MemorySegment.ofAddress(id); + } + + /** The callable registered under a user data pointer. */ + public static Object callbackState(java.lang.foreign.MemorySegment userdata) + { + Object[] entry = CALLBACKS.get(userdata.address()); + if (entry == null) + throw new IllegalStateException("Unknown callback state: " + userdata.address() + "."); + return entry[0]; + } + + // The `userdata_callback` of the C bindings: releases the user data of `this` object, then copies the other one into it, if any. + private static void callbackStateChanged(java.lang.foreign.MemorySegment thisUserdata, java.lang.foreign.MemorySegment otherUserdata) + { + java.lang.foreign.MemorySegment slot = thisUserdata.reinterpret(java.lang.foreign.ValueLayout.ADDRESS.byteSize()); + long current = slot.get(java.lang.foreign.ValueLayout.ADDRESS, 0).address(); + if (current != 0) + { + Object[] entry = CALLBACKS.get(current); + if (entry != null && ((java.util.concurrent.atomic.AtomicInteger)entry[1]).decrementAndGet() == 0) + CALLBACKS.remove(current); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, java.lang.foreign.MemorySegment.NULL); + } + if (otherUserdata.address() != 0) + { + Object[] entry = CALLBACKS.get(otherUserdata.address()); + if (entry != null) + ((java.util.concurrent.atomic.AtomicInteger)entry[1]).incrementAndGet(); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, otherUserdata); + } + } + + public static final java.lang.foreign.MemorySegment CALLBACK_STATE_STUB = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, "callbackStateChanged", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); +)JAVA"; + if (c_desc.exception_handling_enabled) { - ffi += "\n // C++ exceptions are reported by the C bindings through a callback, which stores the message here until the wrapper checks it.\n"; - ffi += " private static final ThreadLocal PENDING_EXCEPTION = new ThreadLocal<>();\n\n"; + ffi += "\n // C++ exceptions are reported by the C bindings through this callback, which stores the message until the wrapper checks it.\n"; ffi += " private static void exceptionHandler(java.lang.foreign.MemorySegment messages, java.lang.foreign.MemorySegment typeNames, java.lang.foreign.MemorySegment userdata)\n {\n"; ffi += " StringBuilder text = new StringBuilder();\n"; ffi += " java.lang.foreign.MemorySegment array = messages.reinterpret(Long.MAX_VALUE);\n"; @@ -1135,17 +1492,12 @@ public abstract class CppStruct implements Native ffi += " if (i > 0)\n text.append('\\n');\n"; ffi += " text.append(message.reinterpret(Long.MAX_VALUE).getString(0));\n"; ffi += " }\n"; - ffi += " PENDING_EXCEPTION.set(text.toString());\n }\n\n"; + ffi += " PENDING.set(text.toString());\n }\n\n"; ffi += " static\n {\n"; ffi += " try\n {\n"; - ffi += " java.lang.invoke.MethodHandle handler = java.lang.invoke.MethodHandles.lookup().findStatic(Ffi.class, \"exceptionHandler\", java.lang.invoke.MethodType.methodType(void.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class));\n"; - ffi += " java.lang.foreign.MemorySegment stub = LINKER.upcallStub(handler, java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS), java.lang.foreign.Arena.global());\n"; + ffi += " java.lang.foreign.MemorySegment stub = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, \"exceptionHandler\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS));\n"; ffi += " downcall(\"\", \"" + hp + "SetExceptionHandler\", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)).invokeExact(stub, java.lang.foreign.MemorySegment.NULL);\n"; - ffi += " }\n catch (Throwable e)\n {\n // The message survives the `NoClassDefFoundError` that the later uses of this class get.\n throw new IllegalStateException(\"Failed to register the C++ exception handler: \" + e, e);\n }\n }\n\n"; - ffi += " /** Throws if the last call into the C bindings threw a C++ exception. */\n"; - ffi += " public static void checkException()\n {\n"; - ffi += " String message = PENDING_EXCEPTION.get();\n"; - ffi += " if (message != null)\n {\n PENDING_EXCEPTION.remove();\n throw new CppException(message);\n }\n }\n"; + ffi += " }\n catch (Throwable e)\n {\n // The message survives the `NoClassDefFoundError` that the later uses of this class get.\n throw new IllegalStateException(\"Failed to register the C++ exception handler: \" + e, e);\n }\n }\n"; } ffi += "}\n"; output_files[root.dir + "/Ffi.java"] = ffi; @@ -1572,8 +1924,10 @@ public abstract class CppStruct implements Native ret.fallback_name = std::move(fallback_name); std::vector sig_parts; - for (const auto ¶m : func.params) + ret.param_indices.assign(func.params.size(), std::size_t(-1)); + for (std::size_t i = 0; i < func.params.size(); i++) { + const auto ¶m = func.params[i]; auto mapped = MapParam(param, this_type); if (!mapped) { @@ -1588,6 +1942,7 @@ public abstract class CppStruct implements Native ret.is_raw |= mapped->is_raw; for (const auto &[pname, ptype] : mapped->java_params) sig_parts.push_back(ptype); + ret.param_indices[i] = ret.params.size(); ret.params.push_back(std::move(*mapped)); } ret.signature = JoinNameParts(sig_parts, ","); @@ -1641,7 +1996,6 @@ public abstract class CppStruct implements Native { const CInterop::BasicFuncLike &f = *func.func; const std::string F = RuntimeClass("Ffi"); - const bool handle_exceptions = c_desc.exception_handling_enabled && !f.is_noexcept; std::string extra_doc = "Calls `" + f.c_name + "()`."; if (func.is_raw) @@ -1681,7 +2035,34 @@ public abstract class CppStruct implements Native num_object_params++; } } - std::string owner = func.is_static ? (num_object_params == 1 ? object_param : "null") : "this"; + // The `[[clang::lifetimebound]]` annotations (and the lifetimes the C generator infers) tell what the returned reference points into, + // and that's what the wrapper keeps alive. Without them it's `this`, or the only object parameter. + std::vector owners; + for (const auto &rel : f.lifetimes.relations) + { + if (!std::holds_alternative(rel.holder)) + continue; + std::string target; + if (std::holds_alternative(rel.target)) + { + if (!func.is_static) + target = "this"; + } + else if (auto param = std::get_if(&rel.target)) + { + if (param->index >= 0 && std::size_t(param->index) < func.param_indices.size() && func.param_indices[std::size_t(param->index)] != std::size_t(-1)) + target = func.params[func.param_indices[std::size_t(param->index)]].object_param; + } + if (!target.empty() && std::find(owners.begin(), owners.end(), target) == owners.end()) + owners.push_back(target); + } + std::string owner; + if (owners.empty()) + owner = func.is_static ? (num_object_params == 1 ? object_param : "null") : "this"; + else if (owners.size() == 1) + owner = owners.front(); + else + owner = "new java.lang.Object[]{" + JoinNameParts(owners, ", ") + "}"; // The call. std::string args; @@ -1702,8 +2083,7 @@ public abstract class CppStruct implements Native body += call + ";\n"; else body += func.ret.handle_type + " __ret = (" + func.ret.handle_type + ")" + call + ";\n"; - if (handle_exceptions) - body += F + ".checkException();\n"; + body += F + ".checkException();\n"; if (func.is_ctor) body += "return __ret;\n"; // The constructor wraps it. else if (func.ret.handle_type != "void") @@ -2015,6 +2395,10 @@ public abstract class CppStruct implements Native members += "public " + def_name + "() {super(" + F + ".allocStruct(LAYOUT), null);}\n\n"; } + EmitCasts(info, members, used_keys); + if (cl.std_function && info.has_destroy) + EmitStdFunction(info, members, used_keys); + // Conveniences for `std::string`. if (cpp_name == "std::string") { @@ -2119,7 +2503,7 @@ public abstract class CppStruct implements Native } for (auto &[relative_name, file] : file_classes) { - if (dir_packages.contains(file.java_path)) + if (dir_packages.contains(file.java_path) || std::find(base_package_segments.begin(), base_package_segments.end(), file.idents.back()) != base_package_segments.end()) { // Rename the class, and fix up the handle paths pointing to it. std::string old_path = file.java_path; @@ -2149,7 +2533,7 @@ public abstract class CppStruct implements Native dir += "/" + file.idents[i]; } std::string out = "package " + pkg + ";\n\n"; - out += "/** The downcall handles of the C bindings file `" + relative_name + "`. Generated by mrbind, do not edit. */\n"; + out += "/** The downcall handles of the C bindings file `" + relative_name + "`. */\n"; out += "public final class " + file.idents.back() + "\n{\n"; out += " private " + file.idents.back() + "() {}\n"; for (std::size_t i = 0; i < file.handles.size(); i += handles_per_chunk) @@ -2196,7 +2580,7 @@ public abstract class CppStruct implements Native if (!module.free_funcs.empty()) { std::string out = "package " + module.package + ";\n\n"; - out += "/** The free functions of this namespace. Generated by mrbind, do not edit. */\n"; + out += "/** The free functions of this namespace. */\n"; out += "@java.lang.SuppressWarnings({\"restricted\", \"cast\"})\npublic final class Functions\n{\n private Functions() {}\n\n"; std::string body = module.free_funcs; while (body.ends_with("\n\n")) diff --git a/src/generators/java/generator.h b/src/generators/java/generator.h index b2fd5593..6b0d5788 100644 --- a/src/generators/java/generator.h +++ b/src/generators/java/generator.h @@ -4,6 +4,7 @@ #include +#include #include #include #include @@ -106,6 +107,7 @@ namespace mrbind::Java std::unordered_map types_by_c_name; std::set platform_dependent_structs; // By C++ name. std::unordered_map handle_paths; // C function name -> the fully qualified downcall handle. + std::vector base_package_segments; std::unordered_map cached_parsed_types; [[nodiscard]] const cppdecl::Type &ParseTypeOrThrow(const std::string &str); @@ -177,6 +179,7 @@ namespace mrbind::Java std::string preferred_name; std::string fallback_name; // Derived from the C name, unique. bool is_raw = false; + std::vector param_indices; // The index in the description -> the index in `params`, or -1. }; // Returns null if the function has to be skipped entirely. [[nodiscard]] std::optional PrepareFunc(const CInterop::BasicFuncLike &func, const TypeInfo *this_type, bool is_ctor, std::string preferred_name, std::string fallback_name); @@ -185,6 +188,13 @@ namespace mrbind::Java // Emits one wrapper method or constructor. `indent` is in levels. void EmitPrepared(std::string &out, const PreparedFunc &func, const std::string &name, int indent); + // Calls `func` with every base class the C bindings have casts for, in order, with the inheritance kind. + void ForEachCastBase(const TypeInfo &info, const std::function &func) const; + // Emits the casts to the base classes and from them, which the C bindings have but the description doesn't list. + void EmitCasts(const TypeInfo &info, std::string &members, std::set &used_keys); + // Emits the construction of a `std::function` from a Java lambda. + void EmitStdFunction(const TypeInfo &info, std::string &members, std::set &used_keys); + [[nodiscard]] std::string MakeDocComment(const CInterop::Comment &comment, int indent, const std::string &extra_line = "") const; [[nodiscard]] std::string HandleDecl(const CInterop::BasicFuncLike &func, bool &ok); diff --git a/test/run_java/Main.java b/test/run_java/Main.java index 6729686e..553ac4d9 100644 --- a/test/run_java/Main.java +++ b/test/run_java/Main.java @@ -3,6 +3,10 @@ import mrbind_test.CppException; import mrbind_test.mr.A; import mrbind_test.mr.cs.std_string; +import mrbind_test.mr.cs.std_function_MR_StdFunction_A; +import mrbind_test.mr.cs.std_function_int_from_int_int; +import mrbind_test.mr.cs.std_function_void; +import mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A; import mrbind_test.mr.cs.std_vector_int; import mrbind_test.mr.csharp.E1; import mrbind_test.mr.csharp.ExposedLayout; @@ -89,6 +93,49 @@ public static void main(String[] args) } check(caught, "exception"); + // `std::function` from a Java lambda. The copies of the `std::function` share it. + int[] counter = {0}; + std_function_int_from_int_int f = std_function_int_from_int_int.of((x, y) -> {counter[0]++; return x + y;}); + check(f.has_value(), "has_value"); + check(f.call(2, 3) == 5, "call"); + std_function_int_from_int_int f2 = new std_function_int_from_int_int(f); + check(f2.call(10, 20) == 30, "call the copy"); + check(counter[0] == 2, "shared lambda"); + mrbind_test.mr.stdfunction.Functions.foo(f); + std_function_void e = new std_function_void(); + check(!e.has_value(), "empty"); + e.assignFn(() -> {}); + check(e.has_value(), "assigned"); + // Classes passed and returned by value. + std_function_MR_StdFunction_A g = std_function_MR_StdFunction_A.of(() -> + { + mrbind_test.mr.stdfunction.A a = new mrbind_test.mr.stdfunction.A(); + a.setA("made in java"); + return a; + }); + check(g.call().a().toString().equals("made in java"), "class returned by value"); + std_function_void_from_MR_StdFunction_A h = std_function_void_from_MR_StdFunction_A.of(a -> check(a.a().toString().equals("made in java"), "class passed by reference")); + h.call(g.call()); + // An exception thrown by the lambda is rethrown by the wrapper that called into C. + std_function_void bad = std_function_void.of(() -> {throw new IllegalStateException("from the lambda");}); + caught = false; + try + { + bad.call(); + } + catch (IllegalStateException error) + { + caught = error.getMessage().equals("from the lambda"); + } + check(caught, "lambda exception"); + + // Casts between a class and its bases. + mrbind_test.mr.bases.B b = new mrbind_test.mr.bases.B(); + mrbind_test.mr.bases.A aBase = b.upcastToA(); + mrbind_test.mr.bases.B back = mrbind_test.mr.bases.B.staticDowncastFromA(aBase); + check(back.rawPointer().address() == b.rawPointer().address(), "downcast gives the same object"); + check(!aBase.isOwned() && b.isOwned(), "the cast result is a reference"); + System.out.println("All Java binding tests passed."); } } From 26a62d68c733ba39d938258ff18c7e6229f6a4bf Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 13 Oct 2026 20:38:50 +0300 Subject: [PATCH 09/10] Java: regenerate the test outputs Co-Authored-By: Claude Fable 5.1 --- .../src/mrbind_test/CppException.java | 2 +- .../src/mrbind_test/CppObject.java | 2 +- .../src/mrbind_test/CppStruct.java | 2 +- test/output_java/src/mrbind_test/Ffi.java | 101 +++++- test/output_java/src/mrbind_test/Native.java | 2 +- test/output_java/src/mrbind_test/ffi/A/a.java | 5 +- .../src/mrbind_test/ffi/AB_base/ab_base.java | 2 +- test/output_java/src/mrbind_test/ffi/B/b.java | 5 +- .../src/mrbind_test/ffi/MR/_1.java | 2 +- .../ffi/MR/test_abstract_classes.java | 5 +- .../ffi/MR/test_adjusting_names.java | 2 +- .../mrbind_test/ffi/MR/test_aggregates.java | 2 +- .../MR/test_arrays_of_incomplete_types.java | 2 +- .../MR/test_arrays_of_incomplete_types_2.java | 2 +- .../src/mrbind_test/ffi/MR/test_bases.java | 21 +- .../mrbind_test/ffi/MR/test_combined_a_b.java | 2 +- .../src/mrbind_test/ffi/MR/test_conv_ops.java | 2 +- .../ffi/MR/test_copy_inherited_members.java | 41 ++- .../src/mrbind_test/ffi/MR/test_csharp.java | 81 +++-- .../ffi/MR/test_custom_preferred_names.java | 2 +- .../ffi/MR/test_declaration_order.java | 2 +- .../mrbind_test/ffi/MR/test_deprecation.java | 2 +- .../MR/test_includes_for_enum_constants.java | 2 +- .../test_includes_for_enum_constants_2.java | 2 +- .../test_includes_for_enum_constants_3.java | 2 +- .../src/mrbind_test/ffi/MR/test_iostream.java | 2 +- .../ffi/MR/test_lifetime_inference.java | 2 +- .../ffi/MR/test_matching_layout.java | 2 +- .../mrbind_test/ffi/MR/test_member_vars.java | 2 +- .../ffi/MR/test_mention_blacklists.java | 2 +- .../MR/test_nested_class_template_inst.java | 2 +- .../mrbind_test/ffi/MR/test_nested_types.java | 2 +- ...test_omitting_template_args_and_quals.java | 2 +- .../ffi/MR/test_overloaded_operators.java | 2 +- .../mrbind_test/ffi/MR/test_overloads.java | 2 +- .../src/mrbind_test/ffi/MR/test_phmap.java | 2 +- .../mrbind_test/ffi/MR/test_simple_types.java | 2 +- .../ffi/MR/test_size_t_ptrdiff_t.java | 2 +- .../ffi/MR/test_static_memberr.java | 2 +- .../ffi/MR/test_std_containers.java | 2 +- .../mrbind_test/ffi/MR/test_std_expected.java | 2 +- .../ffi/MR/test_std_filesystem.java | 2 +- .../mrbind_test/ffi/MR/test_std_function.java | 2 +- .../mrbind_test/ffi/MR/test_std_optional.java | 2 +- .../ffi/MR/test_std_shared_ptr.java | 2 +- .../mrbind_test/ffi/MR/test_std_string.java | 2 +- .../ffi/MR/test_std_string_view.java | 2 +- .../ffi/MR/test_std_tuple_like.java | 2 +- .../ffi/MR/test_std_unique_ptr.java | 2 +- .../src/mrbind_test/ffi/MR/test_tags.java | 2 +- .../ffi/MR/test_typedefs_in_templates.java | 2 +- .../mrbind_test/ffi/MR/test_using_decls.java | 4 +- .../src/mrbind_test/ffi/MR/test_variant.java | 2 +- .../src/mrbind_test/ffi/iostream.java | 2 +- .../ffi/phmap_btree_map_int_float.java | 2 +- .../ffi/phmap_btree_multimap_int_float.java | 2 +- .../ffi/phmap_btree_multiset_int.java | 2 +- .../mrbind_test/ffi/phmap_btree_set_int.java | 2 +- .../ffi/phmap_flat_hash_map_int_float.java | 2 +- .../ffi/phmap_flat_hash_set_int.java | 2 +- .../ffi/phmap_node_hash_map_int_float.java | 2 +- .../ffi/phmap_node_hash_set_int.java | 2 +- ...hmap_parallel_flat_hash_map_int_float.java | 2 +- .../ffi/phmap_parallel_flat_hash_set_int.java | 2 +- ...hmap_parallel_node_hash_map_int_float.java | 2 +- .../ffi/phmap_parallel_node_hash_set_int.java | 2 +- .../ffi/std_array_MR_StdContainers_A_42.java | 2 +- ...ray_MR_StdContainers_NonAssignable_42.java | 2 +- .../src/mrbind_test/ffi/std_array_int_43.java | 2 +- .../ffi/std_array_int_array_4_array_3_5.java | 2 +- ..._deque_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_deque_int.java | 2 +- .../ffi/std_expected_MR_CSharp_E1_float.java | 2 +- ...ected_MR_CSharp_ExposedLayoutSh_float.java | 2 +- ...xpected_MR_CSharp_ExposedLayout_float.java | 2 +- ...d_expected_MR_CSharp_NonTrivial_float.java | 2 +- .../ffi/std_expected_MR_CSharp_SA_float.java | 2 +- .../std_expected_MR_CSharp_Trivial_float.java | 2 +- .../ffi/std_expected_int_float.java | 2 +- .../ffi/std_expected_int_std_string.java | 2 +- .../ffi/std_expected_void_float.java | 2 +- .../mrbind_test/ffi/std_filesystem_path.java | 2 +- ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 4 +- ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 4 +- .../ffi/std_function_MR_StdFunction_A.java | 4 +- ...dFunction_E_from_int_MR_StdFunction_E.java | 4 +- .../src/mrbind_test/ffi/std_function_int.java | 4 +- .../ffi/std_function_int_from_int_int.java | 4 +- .../ffi/std_function_int_from_std_string.java | 4 +- ...n_int_ref_from_int_ref_int_rvalue_ref.java | 4 +- .../ffi/std_function_int_rvalue_ref.java | 4 +- ...td_function_std_string_from_int_float.java | 4 +- .../std_function_std_string_from_int_int.java | 4 +- .../mrbind_test/ffi/std_function_void.java | 4 +- ...d_function_void_from_MR_StdFunction_A.java | 4 +- .../ffi/std_function_void_from_int_int.java | 4 +- .../std_function_void_from_std_string.java | 4 +- ...d_list_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_list_int.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../mrbind_test/ffi/std_map_int_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_multimap_int_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../mrbind_test/ffi/std_multiset_float.java | 2 +- .../src/mrbind_test/ffi/std_multiset_int.java | 2 +- ...td_optional_MR_CSharp_ExposedLayoutSh.java | 2 +- .../std_optional_MR_CSharp_NonTrivial.java | 2 +- .../ffi/std_optional_MR_CSharp_SA.java | 2 +- .../ffi/std_optional_MR_CSharp_Trivial.java | 2 +- .../ffi/std_optional_MR_StdOptional_A.java | 2 +- .../ffi/std_optional_MR_StdOptional_B.java | 2 +- .../ffi/std_optional_MR_StdOptional_E.java | 2 +- .../src/mrbind_test/ffi/std_optional_int.java | 2 +- .../ffi/std_optional_std_string.java | 2 +- .../std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_pair_const_int_float.java | 2 +- ...td_pair_const_int_ref_const_float_ref.java | 2 +- ...int_rvalue_ref_const_float_rvalue_ref.java | 2 +- .../mrbind_test/ffi/std_pair_int_float.java | 2 +- .../ffi/std_pair_int_ref_float_ref.java | 2 +- ..._pair_int_rvalue_ref_float_rvalue_ref.java | 2 +- .../ffi/std_pair_int_std_string.java | 2 +- ...td_set_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_set_float.java | 2 +- .../src/mrbind_test/ffi/std_set_int.java | 2 +- ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SA.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SE.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SG.java | 2 +- .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 2 +- .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 2 +- ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 2 +- ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 2 +- .../std_shared_ptr_const_MR_CSharp_SA.java | 2 +- ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 2 +- ...red_ptr_const_MR_StdSharedPtr_A_array.java | 2 +- ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 2 +- .../ffi/std_shared_ptr_const_int.java | 2 +- .../ffi/std_shared_ptr_const_int_array.java | 2 +- .../std_shared_ptr_const_int_array_42.java | 2 +- .../ffi/std_shared_ptr_const_void.java | 2 +- .../mrbind_test/ffi/std_shared_ptr_int.java | 2 +- .../ffi/std_shared_ptr_int_array.java | 2 +- .../ffi/std_shared_ptr_int_array_42.java | 2 +- .../mrbind_test/ffi/std_shared_ptr_void.java | 2 +- .../src/mrbind_test/ffi/std_string.java | 2 +- .../src/mrbind_test/ffi/std_string_view.java | 2 +- .../src/mrbind_test/ffi/std_tuple.java | 2 +- ...dLayout_const_MR_CSharp_ExposedLayout.java | 2 +- ...ref_const_MR_CSharp_ExposedLayout_ref.java | 2 +- ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 2 +- ...st_float_ref_int_rvalue_ref_flo__22dd.java | 2 +- ...tring_ref_const_std_string_rvalue_ref.java | 2 +- .../ffi/std_tuple_const_int_std_string.java | 2 +- .../ffi/std_tuple_float_double_int_int.java | 2 +- .../src/mrbind_test/ffi/std_tuple_int.java | 2 +- .../mrbind_test/ffi/std_tuple_int_float.java | 2 +- ..._std_string_ref_std_string_rvalue_ref.java | 2 +- .../ffi/std_tuple_int_std_string.java | 2 +- .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 2 +- ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 2 +- .../mrbind_test/ffi/std_unique_ptr_int.java | 2 +- .../ffi/std_unique_ptr_int_array.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_unordered_map_int_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_unordered_multimap_int_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_multiset_int.java | 2 +- ...ed_set_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_set_int.java | 2 +- .../ffi/std_variant_int_float.java | 2 +- .../ffi/std_variant_int_float_float.java | 2 +- .../ffi/std_variant_int_float_std_string.java | 2 +- .../std_variant_std_monostate_int_float.java | 2 +- ...variant_std_monostate_int_float_float.java | 2 +- .../src/mrbind_test/ffi/std_vector_MR_A.java | 2 +- .../ffi/std_vector_MR_CSharp_A_ptr.java | 2 +- .../std_vector_MR_CSharp_ExposedLayout.java | 2 +- .../ffi/std_vector_MR_SeparateA.java | 2 +- .../ffi/std_vector_MR_SeparateB.java | 2 +- ...vector_MR_StdContainers_NonAssignable.java | 2 +- ...StdContainers_NonDefaultConstructible.java | 2 +- .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 2 +- .../src/mrbind_test/ffi/std_vector_int.java | 2 +- .../src/mrbind_test/ffi/std_vector_long.java | 2 +- ...td_vector_std_expected_int_std_string.java | 2 +- ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- .../ffi/std_vector_unsigned_long.java | 2 +- test/output_java/src/mrbind_test/mr/A.java | 2 + .../src/mrbind_test/mr/Functions.java | 2 +- .../src/mrbind_test/mr/SeparateA.java | 62 ++++ .../src/mrbind_test/mr/SeparateB.java | 62 ++++ .../src/mrbind_test/mr/abstractclasses/C.java | 60 ++++ .../src/mrbind_test/mr/adjustingnames/A.java | 2 + .../mr/adjustingnames/Functions.java | 2 +- .../src/mrbind_test/mr/aggregates/A.java | 4 + .../src/mrbind_test/mr/aggregates/C.java | 16 + .../src/mrbind_test/mr/aggregates/D.java | 18 + .../src/mrbind_test/mr/aggregates/E.java | 20 ++ .../src/mrbind_test/mr/bases/B.java | 40 +++ .../src/mrbind_test/mr/bases/B2.java | 80 +++++ .../src/mrbind_test/mr/bases/C.java | 40 +++ .../src/mrbind_test/mr/bases/F.java | 40 +++ .../src/mrbind_test/mr/bases/G.java | 40 +++ .../src/mrbind_test/mr/bases/H.java | 80 +++++ .../src/mrbind_test/mr/bases/I.java | 60 ++++ .../mr/copyinheritedmembers/A.java | 4 + .../mr/copyinheritedmembers/B.java | 4 + .../mr/copyinheritedmembers/C.java | 80 +++++ .../mr/copyinheritedmembers/D.java | 44 +++ .../mr/copyinheritedmembers/E.java | 120 +++++++ .../mr/copyinheritedmembers/F.java | 120 +++++++ .../mr/copyinheritedmembers/G.java | 24 ++ .../mr/copyinheritedmembers/H.java | 64 ++++ .../mr/copyinheritedmembers/I.java | 64 ++++ .../mr/copyinheritedmembers/J.java | 44 +++ .../mr/copyinheritedmembers/M.java | 44 +++ .../mr/copyinheritedmembers/N.java | 84 +++++ .../mr/copyinheritedmembers/O.java | 124 +++++++ .../src/mrbind_test/mr/cs/Functions.java | 2 +- ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 61 ++++ ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 61 ++++ .../mr/cs/std_function_MR_StdFunction_A.java | 62 ++++ ...dFunction_E_from_int_MR_StdFunction_E.java | 61 ++++ .../mrbind_test/mr/cs/std_function_int.java | 61 ++++ .../mr/cs/std_function_int_from_int_int.java | 61 ++++ .../cs/std_function_int_from_std_string.java | 61 ++++ ...n_int_ref_from_int_ref_int_rvalue_ref.java | 61 ++++ .../mr/cs/std_function_int_rvalue_ref.java | 61 ++++ ...td_function_std_string_from_int_float.java | 62 ++++ .../std_function_std_string_from_int_int.java | 62 ++++ .../mrbind_test/mr/cs/std_function_void.java | 59 +++ ...d_function_void_from_MR_StdFunction_A.java | 59 +++ .../mr/cs/std_function_void_from_int_int.java | 59 +++ .../cs/std_function_void_from_std_string.java | 59 +++ .../mrbind_test/mr/csharp/ArrayMembers.java | 18 + .../src/mrbind_test/mr/csharp/B.java | 60 ++++ .../src/mrbind_test/mr/csharp/C.java | 46 ++- .../mr/csharp/ClassMemberPointersBool.java | 12 + .../mr/csharp/ClassMemberPointersClass.java | 12 + .../mr/csharp/ClassMemberPointersExposed.java | 12 + .../mr/csharp/ClassMemberPointersUshort.java | 12 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 2 +- .../mr/csharp/ExposedLayoutSh.java | 8 +- .../src/mrbind_test/mr/csharp/F.java | 140 ++++++++ .../src/mrbind_test/mr/csharp/Functions.java | 3 +- .../src/mrbind_test/mr/csharp/G.java | 120 +++++++ .../src/mrbind_test/mr/csharp/IncrDecrA.java | 1 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 1 + .../src/mrbind_test/mr/csharp/IndexerA.java | 2 + .../src/mrbind_test/mr/csharp/IndexerB.java | 2 + .../src/mrbind_test/mr/csharp/IterableA.java | 2 + .../src/mrbind_test/mr/csharp/IterableB.java | 2 + .../src/mrbind_test/mr/csharp/IterableC.java | 2 + .../src/mrbind_test/mr/csharp/IterableD.java | 2 + .../src/mrbind_test/mr/csharp/IterableE.java | 2 + .../src/mrbind_test/mr/csharp/IterableF.java | 2 + .../src/mrbind_test/mr/csharp/IterableG.java | 8 +- .../src/mrbind_test/mr/csharp/IterableH.java | 18 +- .../src/mrbind_test/mr/csharp/IterableI.java | 12 +- .../src/mrbind_test/mr/csharp/IterableJ.java | 2 + .../src/mrbind_test/mr/csharp/IterableK.java | 2 + .../mrbind_test/mr/csharp/IterableK_Iter.java | 2 + .../mr/csharp/IterableK_Sentinel.java | 2 + .../mrbind_test/mr/csharp/IterableL_int.java | 2 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 2 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 2 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 2 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 4 +- .../src/mrbind_test/mr/csharp/LifetimesE.java | 4 +- .../mrbind_test/mr/csharp/NameConflicts.java | 4 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 2 + .../mrbind_test/mr/csharp/RelationalE.java | 10 +- .../mrbind_test/mr/csharp/RelationalF.java | 16 +- .../src/mrbind_test/mr/csharp/SA.java | 10 +- .../src/mrbind_test/mr/csharp/SB.java | 4 +- .../src/mrbind_test/mr/csharp/SC.java | 82 +++++ .../src/mrbind_test/mr/csharp/SE.java | 2 + .../src/mrbind_test/mr/csharp/SF.java | 102 ++++++ .../src/mrbind_test/mr/csharp/TestFields.java | 20 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 28 +- .../src/mrbind_test/mr/csharp/TestOpsB.java | 26 +- .../mr/csharp/TestStdFunction.java | 14 + .../src/mrbind_test/mr/csharp/Trivial.java | 2 + .../mr/customprefnames/Functions.java | 2 +- .../mrbind_test/mr/deprecation/Functions.java | 2 +- .../includesforenumconstants/Functions.java | 2 +- .../mr/incompletearrayelemtype/Functions.java | 2 +- .../mrbind_test/mr/iostream/Functions.java | 2 +- .../mrbind_test/mr/lifetimeinference/A.java | 2 + .../mrbind_test/mr/lifetimeinference/B.java | 2 + .../mr/lifetimeinference/Functions.java | 2 +- .../src/mrbind_test/mr/matchinglayout/A.java | 2 + .../mr/matchinglayout/Functions.java | 2 +- .../src/mrbind_test/mr/membervars/A.java | 9 + .../src/mrbind_test/mr/nestedtypes/A.java | 4 + .../mr/omittingtargsandquals/A_float.java | 1 + .../mr/omittingtargsandquals/A_int.java | 1 + .../mr/omittingtargsandquals/Functions.java | 2 +- .../mr/overloadedops/Functions.java | 2 +- .../mrbind_test/mr/overloads/Functions.java | 2 +- .../src/mrbind_test/mr/phmap/Functions.java | 2 +- .../mrbind_test/mr/signaturefilters/Blah.java | 2 + .../mr/signaturefilters/Functions.java | 2 +- .../src/mrbind_test/mr/staticfuncs/A.java | 2 + .../mr/stdcontainers/Functions.java | 2 +- .../mrbind_test/mr/stdexpected/Functions.java | 2 +- .../mr/stdfilesystem/Functions.java | 2 +- .../src/mrbind_test/mr/stdfunction/A.java | 2 + .../mrbind_test/mr/stdfunction/Functions.java | 2 +- .../src/mrbind_test/mr/stdoptional/A.java | 4 + .../src/mrbind_test/mr/stdoptional/B.java | 4 + .../mrbind_test/mr/stdoptional/Functions.java | 2 +- .../mr/stdsharedptr/Functions.java | 2 +- .../mrbind_test/mr/stdstring/Functions.java | 2 +- .../mr/stdstringview/Functions.java | 2 +- .../mr/stdtuplelike/Functions.java | 2 +- .../mr/stduniqueptr/Functions.java | 2 +- .../mrbind_test/mr/stdvariant/Functions.java | 2 +- .../src/mrbind_test/mr/tags/Functions.java | 2 +- .../ClassTemplate_unsigned_long.java | 2 + .../mr/testsimpletypes/Functions.java | 2 +- .../mrbind_test/mr/testsizet/Functions.java | 2 +- .../mr/typedefsintemplates/Functions.java | 2 +- .../src/mrbind_test/mr/usingdecls/A.java | 4 + .../src/mrbind_test/mr/usingdecls/B.java | 44 +++ .../src/mrbind_test/CppException.java | 2 +- .../src/mrbind_test/CppObject.java | 2 +- .../src/mrbind_test/CppStruct.java | 2 +- .../src/mrbind_test/Ffi.java | 83 ++++- .../src/mrbind_test/Native.java | 2 +- .../src/mrbind_test/ffi/A/a.java | 5 +- .../ffi/A/std_vector_MR_SeparateA.java | 2 +- .../std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- .../src/mrbind_test/ffi/AB_base/ab_base.java | 2 +- .../src/mrbind_test/ffi/B/b.java | 5 +- .../ffi/B/std_vector_MR_SeparateB.java | 2 +- .../src/mrbind_test/ffi/MR/_1.java | 2 +- .../ffi/MR/test_abstract_classes.java | 5 +- .../ffi/MR/test_adjusting_names.java | 2 +- .../mrbind_test/ffi/MR/test_aggregates.java | 2 +- .../MR/test_arrays_of_incomplete_types.java | 2 +- .../MR/test_arrays_of_incomplete_types_2.java | 2 +- .../src/mrbind_test/ffi/MR/test_bases.java | 21 +- .../mrbind_test/ffi/MR/test_combined_a_b.java | 2 +- .../src/mrbind_test/ffi/MR/test_conv_ops.java | 2 +- .../ffi/MR/test_copy_inherited_members.java | 41 ++- .../src/mrbind_test/ffi/MR/test_csharp.java | 85 +++-- .../ffi/MR/test_custom_preferred_names.java | 2 +- .../ffi/MR/test_declaration_order.java | 2 +- .../mrbind_test/ffi/MR/test_deprecation.java | 2 +- .../MR/test_includes_for_enum_constants.java | 2 +- .../test_includes_for_enum_constants_2.java | 2 +- .../test_includes_for_enum_constants_3.java | 2 +- .../src/mrbind_test/ffi/MR/test_iostream.java | 2 +- .../ffi/MR/test_lifetime_inference.java | 2 +- .../ffi/MR/test_matching_layout.java | 2 +- .../mrbind_test/ffi/MR/test_member_vars.java | 2 +- .../ffi/MR/test_mention_blacklists.java | 2 +- .../MR/test_nested_class_template_inst.java | 2 +- .../mrbind_test/ffi/MR/test_nested_types.java | 2 +- ...test_omitting_template_args_and_quals.java | 2 +- .../ffi/MR/test_overloaded_operators.java | 2 +- .../mrbind_test/ffi/MR/test_overloads.java | 2 +- .../src/mrbind_test/ffi/MR/test_phmap.java | 2 +- .../mrbind_test/ffi/MR/test_simple_types.java | 2 +- .../ffi/MR/test_size_t_ptrdiff_t.java | 2 +- .../ffi/MR/test_static_memberr.java | 2 +- .../ffi/MR/test_std_containers.java | 2 +- .../mrbind_test/ffi/MR/test_std_expected.java | 2 +- .../ffi/MR/test_std_filesystem.java | 2 +- .../mrbind_test/ffi/MR/test_std_function.java | 2 +- .../mrbind_test/ffi/MR/test_std_optional.java | 2 +- .../ffi/MR/test_std_shared_ptr.java | 2 +- .../mrbind_test/ffi/MR/test_std_string.java | 2 +- .../ffi/MR/test_std_string_view.java | 2 +- .../ffi/MR/test_std_tuple_like.java | 2 +- .../ffi/MR/test_std_unique_ptr.java | 2 +- .../src/mrbind_test/ffi/MR/test_tags.java | 2 +- .../ffi/MR/test_typedefs_in_templates.java | 2 +- .../mrbind_test/ffi/MR/test_using_decls.java | 4 +- .../src/mrbind_test/ffi/MR/test_variant.java | 2 +- .../ffi/expected_MR_CSharp_E1_float.java | 2 +- ...ected_MR_CSharp_ExposedLayoutSh_float.java | 2 +- ...xpected_MR_CSharp_ExposedLayout_float.java | 2 +- .../expected_MR_CSharp_NonTrivial_float.java | 2 +- .../ffi/expected_MR_CSharp_SA_float.java | 2 +- .../ffi/expected_MR_CSharp_Trivial_float.java | 2 +- .../ffi/expected_int32_t_float.java | 2 +- .../ffi/expected_int32_t_std_string.java | 2 +- .../mrbind_test/ffi/expected_void_float.java | 2 +- .../src/mrbind_test/ffi/iostream.java | 2 +- .../ffi/phmap_btree_map_int32_t_float.java | 2 +- .../phmap_btree_multimap_int32_t_float.java | 2 +- .../ffi/phmap_btree_multiset_int32_t.java | 2 +- .../ffi/phmap_btree_set_int32_t.java | 2 +- .../phmap_flat_hash_map_int32_t_float.java | 2 +- .../ffi/phmap_flat_hash_set_int32_t.java | 2 +- .../phmap_node_hash_map_int32_t_float.java | 2 +- .../ffi/phmap_node_hash_set_int32_t.java | 2 +- ..._parallel_flat_hash_map_int32_t_float.java | 2 +- .../phmap_parallel_flat_hash_set_int32_t.java | 2 +- ..._parallel_node_hash_map_int32_t_float.java | 2 +- .../phmap_parallel_node_hash_set_int32_t.java | 2 +- .../ffi/std_array_MR_StdContainers_A_42.java | 2 +- ...ray_MR_StdContainers_NonAssignable_42.java | 2 +- .../mrbind_test/ffi/std_array_int32_t_43.java | 2 +- .../std_array_int32_t_array_4_array_3_5.java | 2 +- ..._deque_MR_StdContainers_NonAssignable.java | 2 +- .../mrbind_test/ffi/std_deque_int32_t.java | 2 +- .../mrbind_test/ffi/std_filesystem_path.java | 2 +- ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 4 +- ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 4 +- .../ffi/std_function_MR_StdFunction_A.java | 4 +- ...ction_E_from_int32_t_MR_StdFunction_E.java | 4 +- .../mrbind_test/ffi/std_function_int32_t.java | 4 +- ...function_int32_t_from_int32_t_int32_t.java | 4 +- .../std_function_int32_t_from_std_string.java | 4 +- ...f_from_int32_t_ref_int32_t_rvalue_ref.java | 4 +- .../ffi/std_function_int32_t_rvalue_ref.java | 4 +- ...unction_std_string_from_int32_t_float.java | 4 +- ...ction_std_string_from_int32_t_int32_t.java | 4 +- .../mrbind_test/ffi/std_function_void.java | 4 +- ...d_function_void_from_MR_StdFunction_A.java | 4 +- ...td_function_void_from_int32_t_int32_t.java | 4 +- .../std_function_void_from_std_string.java | 4 +- ...d_list_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_list_int32_t.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_map_int32_t_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_multimap_int32_t_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../mrbind_test/ffi/std_multiset_float.java | 2 +- .../mrbind_test/ffi/std_multiset_int32_t.java | 2 +- ...td_optional_MR_CSharp_ExposedLayoutSh.java | 2 +- .../std_optional_MR_CSharp_NonTrivial.java | 2 +- .../ffi/std_optional_MR_CSharp_SA.java | 2 +- .../ffi/std_optional_MR_CSharp_Trivial.java | 2 +- .../ffi/std_optional_MR_StdOptional_A.java | 2 +- .../ffi/std_optional_MR_StdOptional_B.java | 2 +- .../ffi/std_optional_MR_StdOptional_E.java | 2 +- .../mrbind_test/ffi/std_optional_int32_t.java | 2 +- .../ffi/std_optional_std_string.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_pair_const_int32_t_float.java | 2 +- ...air_const_int32_t_ref_const_float_ref.java | 2 +- ...2_t_rvalue_ref_const_float_rvalue_ref.java | 2 +- .../ffi/std_pair_int32_t_float.java | 2 +- .../ffi/std_pair_int32_t_ref_float_ref.java | 2 +- ...r_int32_t_rvalue_ref_float_rvalue_ref.java | 2 +- .../ffi/std_pair_int32_t_std_string.java | 2 +- ...td_set_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_set_float.java | 2 +- .../src/mrbind_test/ffi/std_set_int32_t.java | 2 +- ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SA.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SE.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SG.java | 2 +- .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 2 +- .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 2 +- ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 2 +- ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 2 +- .../std_shared_ptr_const_MR_CSharp_SA.java | 2 +- ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 2 +- ...red_ptr_const_MR_StdSharedPtr_A_array.java | 2 +- ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 2 +- .../ffi/std_shared_ptr_const_int32_t.java | 2 +- .../std_shared_ptr_const_int32_t_array.java | 2 +- ...std_shared_ptr_const_int32_t_array_42.java | 2 +- .../ffi/std_shared_ptr_const_void.java | 2 +- .../ffi/std_shared_ptr_int32_t.java | 2 +- .../ffi/std_shared_ptr_int32_t_array.java | 2 +- .../ffi/std_shared_ptr_int32_t_array_42.java | 2 +- .../mrbind_test/ffi/std_shared_ptr_void.java | 2 +- .../src/mrbind_test/ffi/std_string.java | 2 +- .../src/mrbind_test/ffi/std_string_view.java | 2 +- .../src/mrbind_test/ffi/std_tuple.java | 2 +- ...dLayout_const_MR_CSharp_ExposedLayout.java | 2 +- ...ref_const_MR_CSharp_ExposedLayout_ref.java | 2 +- ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 2 +- ...32_t_ref_const_float_ref_int32___98db.java | 2 +- ..._ref_const_std_string_rvalue_re__883b.java | 2 +- .../std_tuple_const_int32_t_std_string.java | 2 +- ...td_tuple_float_double_int32_t_int32_t.java | 2 +- .../mrbind_test/ffi/std_tuple_int32_t.java | 2 +- .../ffi/std_tuple_int32_t_float.java | 2 +- ..._std_string_ref_std_string_rvalue_ref.java | 2 +- .../ffi/std_tuple_int32_t_std_string.java | 2 +- .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 2 +- ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 2 +- .../ffi/std_unique_ptr_int32_t.java | 2 +- .../ffi/std_unique_ptr_int32_t_array.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_unordered_map_int32_t_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../std_unordered_multimap_int32_t_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_multiset_int32_t.java | 2 +- ...ed_set_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_set_int32_t.java | 2 +- .../ffi/std_variant_int32_t_float.java | 2 +- .../ffi/std_variant_int32_t_float_float.java | 2 +- .../std_variant_int32_t_float_std_string.java | 2 +- ...d_variant_std_monostate_int32_t_float.java | 2 +- ...ant_std_monostate_int32_t_float_float.java | 2 +- .../src/mrbind_test/ffi/std_vector_MR_A.java | 2 +- .../ffi/std_vector_MR_CSharp_A_ptr.java | 2 +- .../std_vector_MR_CSharp_ExposedLayout.java | 2 +- ...vector_MR_StdContainers_NonAssignable.java | 2 +- ...StdContainers_NonDefaultConstructible.java | 2 +- .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 2 +- ...td_vector_expected_int32_t_std_string.java | 2 +- .../mrbind_test/ffi/std_vector_int32_t.java | 2 +- .../mrbind_test/ffi/std_vector_int64_t.java | 2 +- .../mrbind_test/ffi/std_vector_uint64_t.java | 2 +- .../src/mrbind_test/mr/A.java | 5 + .../src/mrbind_test/mr/CommonBaseAB.java | 2 + .../src/mrbind_test/mr/Functions.java | 8 +- .../src/mrbind_test/mr/SeparateA.java | 62 ++++ .../src/mrbind_test/mr/SeparateB.java | 62 ++++ .../src/mrbind_test/mr/abstractclasses/A.java | 1 + .../src/mrbind_test/mr/abstractclasses/B.java | 1 + .../src/mrbind_test/mr/abstractclasses/C.java | 60 ++++ .../src/mrbind_test/mr/adjustingnames/A.java | 8 + .../mr/adjustingnames/Functions.java | 4 +- .../src/mrbind_test/mr/aggregates/A.java | 8 + .../src/mrbind_test/mr/aggregates/B.java | 3 + .../src/mrbind_test/mr/aggregates/C.java | 20 ++ .../src/mrbind_test/mr/aggregates/D.java | 21 ++ .../src/mrbind_test/mr/aggregates/E.java | 23 ++ .../aggregates/NonDefaultConstructible.java | 2 + .../src/mrbind_test/mr/bases/A.java | 3 + .../src/mrbind_test/mr/bases/B.java | 43 +++ .../src/mrbind_test/mr/bases/B2.java | 83 +++++ .../src/mrbind_test/mr/bases/C.java | 43 +++ .../src/mrbind_test/mr/bases/D.java | 3 + .../src/mrbind_test/mr/bases/D2.java | 3 + .../src/mrbind_test/mr/bases/D3.java | 3 + .../src/mrbind_test/mr/bases/E.java | 3 + .../src/mrbind_test/mr/bases/F.java | 43 +++ .../src/mrbind_test/mr/bases/G.java | 43 +++ .../src/mrbind_test/mr/bases/H.java | 83 +++++ .../src/mrbind_test/mr/bases/I.java | 63 ++++ .../src/mrbind_test/mr/convops/A.java | 4 + .../mr/copyinheritedmembers/A.java | 11 + .../mr/copyinheritedmembers/B.java | 11 + .../mr/copyinheritedmembers/C.java | 83 +++++ .../mr/copyinheritedmembers/D.java | 43 +++ .../mr/copyinheritedmembers/E.java | 123 +++++++ .../mr/copyinheritedmembers/F.java | 123 +++++++ .../mr/copyinheritedmembers/G.java | 23 ++ .../mr/copyinheritedmembers/H.java | 63 ++++ .../mr/copyinheritedmembers/I.java | 63 ++++ .../mr/copyinheritedmembers/J.java | 43 +++ .../mr/copyinheritedmembers/K.java | 3 + .../mr/copyinheritedmembers/L.java | 3 + .../mr/copyinheritedmembers/M.java | 43 +++ .../mr/copyinheritedmembers/N.java | 83 +++++ .../mr/copyinheritedmembers/O.java | 123 +++++++ .../src/mrbind_test/mr/cs/Functions.java | 114 +++++- .../mr/cs/expected_MR_CSharp_E1_float.java | 8 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 8 + ...xpected_MR_CSharp_ExposedLayout_float.java | 8 + .../expected_MR_CSharp_NonTrivial_float.java | 8 + .../mr/cs/expected_MR_CSharp_SA_float.java | 8 + .../cs/expected_MR_CSharp_Trivial_float.java | 8 + .../mr/cs/expected_int32_t_float.java | 8 + .../mr/cs/expected_int32_t_std_string.java | 8 + .../mr/cs/expected_void_float.java | 7 + .../cs/std_array_MR_StdContainers_A_42.java | 11 + ...ray_MR_StdContainers_NonAssignable_42.java | 9 + ..._deque_MR_StdContainers_NonAssignable.java | 27 ++ ...ntainers_NonAssignable_const_iterator.java | 8 + ..._StdContainers_NonAssignable_iterator.java | 7 + .../mrbind_test/mr/cs/std_deque_int32_t.java | 36 ++ .../cs/std_deque_int32_t_const_iterator.java | 8 + .../mr/cs/std_deque_int32_t_iterator.java | 7 + .../mr/cs/std_filesystem_path.java | 6 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 67 ++++ ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 67 ++++ .../mr/cs/std_function_MR_StdFunction_A.java | 68 ++++ ...ction_E_from_int32_t_MR_StdFunction_E.java | 67 ++++ .../mr/cs/std_function_int32_t.java | 67 ++++ ...function_int32_t_from_int32_t_int32_t.java | 67 ++++ .../std_function_int32_t_from_std_string.java | 67 ++++ ...f_from_int32_t_ref_int32_t_rvalue_ref.java | 67 ++++ .../cs/std_function_int32_t_rvalue_ref.java | 67 ++++ ...unction_std_string_from_int32_t_float.java | 68 ++++ ...ction_std_string_from_int32_t_int32_t.java | 68 ++++ .../mrbind_test/mr/cs/std_function_void.java | 65 ++++ ...d_function_void_from_MR_StdFunction_A.java | 65 ++++ ...td_function_void_from_int32_t_int32_t.java | 65 ++++ .../cs/std_function_void_from_std_string.java | 65 ++++ ...d_list_MR_StdContainers_NonAssignable.java | 28 ++ ...ntainers_NonAssignable_const_iterator.java | 7 + ..._StdContainers_NonAssignable_iterator.java | 6 + .../mrbind_test/mr/cs/std_list_int32_t.java | 30 ++ .../cs/std_list_int32_t_const_iterator.java | 7 + .../mr/cs/std_list_int32_t_iterator.java | 6 + ..._MR_StdContainers_NonAssignable_float.java | 18 + ...rs_NonAssignable_float_const_iterator.java | 9 + ...ntainers_NonAssignable_float_iterator.java | 8 + .../mr/cs/std_map_int32_t_float.java | 18 + .../std_map_int32_t_float_const_iterator.java | 9 + .../mr/cs/std_map_int32_t_float_iterator.java | 8 + ..._MR_StdContainers_NonAssignable_float.java | 17 + ...rs_NonAssignable_float_const_iterator.java | 9 + ...ntainers_NonAssignable_float_iterator.java | 8 + .../mr/cs/std_multimap_int32_t_float.java | 17 + ...multimap_int32_t_float_const_iterator.java | 9 + .../std_multimap_int32_t_float_iterator.java | 8 + ...ltiset_MR_StdContainers_NonAssignable.java | 13 + ...ntainers_NonAssignable_const_iterator.java | 6 + .../mrbind_test/mr/cs/std_multiset_float.java | 15 + .../cs/std_multiset_float_const_iterator.java | 6 + .../mr/cs/std_multiset_int32_t.java | 15 + .../std_multiset_int32_t_const_iterator.java | 6 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 8 + .../cs/std_optional_MR_CSharp_NonTrivial.java | 8 + .../mr/cs/std_optional_MR_CSharp_SA.java | 8 + .../mr/cs/std_optional_MR_CSharp_Trivial.java | 8 + .../mr/cs/std_optional_MR_StdOptional_A.java | 8 + .../mr/cs/std_optional_MR_StdOptional_B.java | 8 + .../mr/cs/std_optional_MR_StdOptional_E.java | 8 + .../mr/cs/std_optional_int32_t.java | 8 + .../mr/cs/std_optional_std_string.java | 8 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 7 + ..._MR_StdContainers_NonAssignable_float.java | 5 + .../mr/cs/std_pair_const_int32_t_float.java | 6 + ...air_const_int32_t_ref_const_float_ref.java | 4 + ...2_t_rvalue_ref_const_float_rvalue_ref.java | 4 + .../mr/cs/std_pair_int32_t_float.java | 8 + .../mr/cs/std_pair_int32_t_ref_float_ref.java | 3 + ...r_int32_t_rvalue_ref_float_rvalue_ref.java | 4 + .../mr/cs/std_pair_int32_t_std_string.java | 8 + ...td_set_MR_StdContainers_NonAssignable.java | 13 + ...ntainers_NonAssignable_const_iterator.java | 6 + .../src/mrbind_test/mr/cs/std_set_float.java | 15 + .../mr/cs/std_set_float_const_iterator.java | 6 + .../mrbind_test/mr/cs/std_set_int32_t.java | 15 + .../mr/cs/std_set_int32_t_const_iterator.java | 6 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SA.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SE.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SG.java | 15 + .../mr/cs/std_shared_ptr_MR_CommonBaseAB.java | 16 + .../cs/std_shared_ptr_MR_StdSharedPtr_A.java | 16 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 17 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 15 + .../cs/std_shared_ptr_const_MR_CSharp_SA.java | 18 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 18 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 19 + ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 17 + .../mr/cs/std_shared_ptr_const_int32_t.java | 18 + .../std_shared_ptr_const_int32_t_array.java | 19 + ...std_shared_ptr_const_int32_t_array_42.java | 17 + .../mr/cs/std_shared_ptr_const_void.java | 13 + .../mr/cs/std_shared_ptr_int32_t.java | 16 + .../mr/cs/std_shared_ptr_int32_t_array.java | 17 + .../cs/std_shared_ptr_int32_t_array_42.java | 15 + .../mr/cs/std_shared_ptr_void.java | 11 + .../src/mrbind_test/mr/cs/std_string.java | 10 + .../mrbind_test/mr/cs/std_string_view.java | 8 + .../src/mrbind_test/mr/cs/std_tuple.java | 3 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 6 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 3 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 4 + ...ef_const_float_ref_int32_t___a385e102.java | 11 + ...tring_ref_const_std_string_rvalue_ref.java | 6 + .../std_tuple_const_int32_t_std_string.java | 6 + ...td_tuple_float_double_int32_t_int32_t.java | 12 + .../mrbind_test/mr/cs/std_tuple_int32_t.java | 6 + .../mr/cs/std_tuple_int32_t_float.java | 8 + ..._std_string_ref_std_string_rvalue_ref.java | 5 + .../mr/cs/std_tuple_int32_t_std_string.java | 8 + .../cs/std_unique_ptr_MR_StdUniquePtr_A.java | 7 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 8 + .../mr/cs/std_unique_ptr_int32_t.java | 7 + .../mr/cs/std_unique_ptr_int32_t_array.java | 8 + ..._MR_StdContainers_NonAssignable_float.java | 18 + ...rs_NonAssignable_float_const_iterator.java | 8 + ...ntainers_NonAssignable_float_iterator.java | 7 + .../cs/std_unordered_map_int32_t_float.java | 18 + ...ered_map_int32_t_float_const_iterator.java | 8 + ..._unordered_map_int32_t_float_iterator.java | 7 + ..._MR_StdContainers_NonAssignable_float.java | 17 + ...rs_NonAssignable_float_const_iterator.java | 8 + ...ntainers_NonAssignable_float_iterator.java | 7 + .../std_unordered_multimap_int32_t_float.java | 17 + ...multimap_int32_t_float_const_iterator.java | 8 + ...dered_multimap_int32_t_float_iterator.java | 7 + ...ltiset_MR_StdContainers_NonAssignable.java | 12 + ...ntainers_NonAssignable_const_iterator.java | 5 + .../mr/cs/std_unordered_multiset_int32_t.java | 15 + ...dered_multiset_int32_t_const_iterator.java | 5 + ...ed_set_MR_StdContainers_NonAssignable.java | 12 + ...ntainers_NonAssignable_const_iterator.java | 5 + .../mr/cs/std_unordered_set_int32_t.java | 15 + ..._unordered_set_int32_t_const_iterator.java | 5 + .../mr/cs/std_variant_int32_t_float.java | 12 + .../cs/std_variant_int32_t_float_float.java | 16 + .../std_variant_int32_t_float_std_string.java | 16 + ...d_variant_std_monostate_int32_t_float.java | 15 + ...ant_std_monostate_int32_t_float_float.java | 19 + .../mrbind_test/mr/cs/std_vector_MR_A.java | 35 ++ .../mr/cs/std_vector_MR_A_const_iterator.java | 8 + .../mr/cs/std_vector_MR_A_iterator.java | 7 + .../mr/cs/std_vector_MR_CSharp_A_ptr.java | 35 ++ ...vector_MR_CSharp_A_ptr_const_iterator.java | 8 + .../std_vector_MR_CSharp_A_ptr_iterator.java | 7 + .../std_vector_MR_CSharp_ExposedLayout.java | 39 ++ ...R_CSharp_ExposedLayout_const_iterator.java | 8 + ...ctor_MR_CSharp_ExposedLayout_iterator.java | 7 + .../mr/cs/std_vector_MR_SeparateA.java | 34 ++ ...td_vector_MR_SeparateA_const_iterator.java | 8 + .../cs/std_vector_MR_SeparateA_iterator.java | 7 + .../mr/cs/std_vector_MR_SeparateB.java | 34 ++ ...td_vector_MR_SeparateB_const_iterator.java | 8 + .../cs/std_vector_MR_SeparateB_iterator.java | 7 + ...vector_MR_StdContainers_NonAssignable.java | 28 ++ ...ntainers_NonAssignable_const_iterator.java | 8 + ..._StdContainers_NonAssignable_iterator.java | 7 + ...StdContainers_NonDefaultConstructible.java | 34 ++ ...onDefaultConstructible_const_iterator.java | 8 + ...ners_NonDefaultConstructible_iterator.java | 7 + .../cs/std_vector_const_MR_CSharp_A_ptr.java | 35 ++ ..._const_MR_CSharp_A_ptr_const_iterator.java | 8 + ...vector_const_MR_CSharp_A_ptr_iterator.java | 7 + ...td_vector_expected_int32_t_std_string.java | 35 ++ ...ted_int32_t_std_string_const_iterator.java | 8 + ..._expected_int32_t_std_string_iterator.java | 7 + .../mrbind_test/mr/cs/std_vector_int32_t.java | 39 ++ .../cs/std_vector_int32_t_const_iterator.java | 8 + .../mr/cs/std_vector_int32_t_iterator.java | 7 + .../mrbind_test/mr/cs/std_vector_int64_t.java | 39 ++ .../cs/std_vector_int64_t_const_iterator.java | 8 + .../mr/cs/std_vector_int64_t_iterator.java | 7 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 34 ++ ...SeparateA_MR_SeparateB_const_iterator.java | 8 + ...ir_MR_SeparateA_MR_SeparateB_iterator.java | 7 + .../mr/cs/std_vector_uint64_t.java | 39 ++ .../std_vector_uint64_t_const_iterator.java | 8 + .../mr/cs/std_vector_uint64_t_iterator.java | 7 + .../src/mrbind_test/mr/csharp/A.java | 10 + .../mr/csharp/AmbiguousTemplates.java | 10 + .../mrbind_test/mr/csharp/ArrayMembers.java | 20 ++ .../src/mrbind_test/mr/csharp/B.java | 64 ++++ .../src/mrbind_test/mr/csharp/C.java | 43 +++ .../src/mrbind_test/mr/csharp/CallOp.java | 7 +- .../mr/csharp/ClassMemberPointersBool.java | 20 +- .../mr/csharp/ClassMemberPointersClass.java | 14 + .../mr/csharp/ClassMemberPointersExposed.java | 14 + .../mr/csharp/ClassMemberPointersUshort.java | 14 + .../mr/csharp/ConstNonconstConflicts.java | 10 + .../src/mrbind_test/mr/csharp/ConvCtor.java | 8 + .../mr/csharp/ConvCtorCopyButNoMove.java | 3 + .../mr/csharp/ConvCtorExposed.java | 1 + .../mr/csharp/ConvCtorNonTrivial.java | 4 + .../csharp/ConvCtorNonTrivialRestricted.java | 3 + .../mr/csharp/ConvCtorTrivial.java | 4 + .../mr/csharp/ConvCtorWithDefArg.java | 3 + .../src/mrbind_test/mr/csharp/ConvOp.java | 5 + .../mrbind_test/mr/csharp/ConvOpToRef.java | 6 + .../src/mrbind_test/mr/csharp/D.java | 5 + .../src/mrbind_test/mr/csharp/E.java | 5 + .../src/mrbind_test/mr/csharp/EqualityA.java | 6 + .../src/mrbind_test/mr/csharp/EqualityB.java | 6 + .../src/mrbind_test/mr/csharp/EqualityC.java | 6 + .../src/mrbind_test/mr/csharp/EqualityD.java | 4 + .../src/mrbind_test/mr/csharp/EqualityE.java | 4 + .../mrbind_test/mr/csharp/ExposedLayout.java | 10 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 2 + .../mr/csharp/ExposedLayoutSh.java | 11 + .../src/mrbind_test/mr/csharp/F.java | 147 +++++++- .../src/mrbind_test/mr/csharp/Functions.java | 335 +++++++++++++++++- .../src/mrbind_test/mr/csharp/G.java | 129 ++++++- .../src/mrbind_test/mr/csharp/IncrDecrA.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrC.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrD.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrE.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrF.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrG.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrH.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrI.java | 3 + .../src/mrbind_test/mr/csharp/IndexerA.java | 7 + .../src/mrbind_test/mr/csharp/IndexerB.java | 9 + .../src/mrbind_test/mr/csharp/IndexerC.java | 5 + .../src/mrbind_test/mr/csharp/IterableA.java | 7 + .../src/mrbind_test/mr/csharp/IterableB.java | 7 + .../src/mrbind_test/mr/csharp/IterableC.java | 9 + .../src/mrbind_test/mr/csharp/IterableD.java | 5 + .../src/mrbind_test/mr/csharp/IterableE.java | 5 + .../src/mrbind_test/mr/csharp/IterableF.java | 5 + .../src/mrbind_test/mr/csharp/IterableG.java | 7 + .../src/mrbind_test/mr/csharp/IterableH.java | 7 + .../src/mrbind_test/mr/csharp/IterableI.java | 7 + .../src/mrbind_test/mr/csharp/IterableJ.java | 7 + .../src/mrbind_test/mr/csharp/IterableK.java | 13 +- .../mrbind_test/mr/csharp/IterableK_Iter.java | 29 +- .../mr/csharp/IterableK_Sentinel.java | 12 +- .../mr/csharp/IterableL_int32_t.java | 7 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 8 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 9 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 6 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 15 +- .../src/mrbind_test/mr/csharp/LifetimesE.java | 10 +- .../mrbind_test/mr/csharp/NameConflicts.java | 9 + .../mr/csharp/NameConflictsExposed.java | 1 + .../mr/csharp/NameConflicts_A.java | 3 + .../mr/csharp/NonCopyableClassByValueOps.java | 3 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 3 + .../mr/csharp/NonTrivialClassOps.java | 4 + .../mr/csharp/NonTrivialDerived.java | 3 + .../src/mrbind_test/mr/csharp/Outer.java | 4 + .../mrbind_test/mr/csharp/Outer_Inner.java | 4 + .../mrbind_test/mr/csharp/RelationalA.java | 7 + .../mrbind_test/mr/csharp/RelationalB.java | 7 + .../mrbind_test/mr/csharp/RelationalC.java | 6 + .../mrbind_test/mr/csharp/RelationalD.java | 7 + .../mrbind_test/mr/csharp/RelationalE.java | 7 + .../mrbind_test/mr/csharp/RelationalF.java | 7 + .../src/mrbind_test/mr/csharp/SA.java | 3 + .../src/mrbind_test/mr/csharp/SB.java | 6 + .../src/mrbind_test/mr/csharp/SC.java | 83 +++++ .../src/mrbind_test/mr/csharp/SD.java | 5 +- .../src/mrbind_test/mr/csharp/SE.java | 20 +- .../src/mrbind_test/mr/csharp/SF.java | 111 +++++- .../src/mrbind_test/mr/csharp/SG.java | 2 +- .../mrbind_test/mr/csharp/StaticOpsLhsA.java | 11 +- .../mrbind_test/mr/csharp/StaticOpsLhsB.java | 11 +- .../mrbind_test/mr/csharp/StaticOpsLhsC.java | 2 + .../mrbind_test/mr/csharp/StaticOpsLhsD.java | 2 + .../mrbind_test/mr/csharp/StaticOpsLhsE.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsF.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsG.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsH.java | 3 + .../mr/csharp/StaticOpsMixedLhs.java | 3 + .../mr/csharp/StaticOpsMixedRhs.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsA.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsB.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsC.java | 2 + .../mrbind_test/mr/csharp/StaticOpsRhsD.java | 2 + .../mrbind_test/mr/csharp/StaticOpsRhsE.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsF.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsG.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsH.java | 3 + .../mr/csharp/StringConvFsPath.java | 4 + .../mr/csharp/StringConvString.java | 4 + .../mr/csharp/StringConvStringView.java | 4 + .../mrbind_test/mr/csharp/TestConstness.java | 5 + .../src/mrbind_test/mr/csharp/TestFields.java | 22 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 36 ++ .../src/mrbind_test/mr/csharp/TestOpsB.java | 54 ++- .../src/mrbind_test/mr/csharp/TestOpsC.java | 73 +++- .../mr/csharp/TestStdFunction.java | 19 + .../src/mrbind_test/mr/csharp/Trivial.java | 3 + .../mrbind_test/mr/csharp/TrivialDerived.java | 3 + .../mrbind_test/mr/customprefnames/Af.java | 3 + .../mrbind_test/mr/customprefnames/Ai.java | 3 + .../mr/customprefnames/Functions.java | 3 +- .../src/mrbind_test/mr/declorder/A.java | 2 + .../src/mrbind_test/mr/declorder/A_B.java | 2 + .../src/mrbind_test/mr/declorder/C_false.java | 1 + .../src/mrbind_test/mr/declorder/C_true.java | 1 + .../mrbind_test/mr/deprecation/Functions.java | 4 +- .../A_MR_IncludesForEnumConstants_E_e1.java | 3 + .../includesforenumconstants/Functions.java | 3 +- .../mr/incompletearrayelemtype/Functions.java | 4 +- .../src/mrbind_test/mr/iostream/A.java | 3 + .../mrbind_test/mr/iostream/Functions.java | 4 +- .../mrbind_test/mr/lifetimeinference/A.java | 8 + .../mrbind_test/mr/lifetimeinference/B.java | 6 + .../mrbind_test/mr/lifetimeinference/C.java | 3 + .../mr/lifetimeinference/Functions.java | 6 +- .../src/mrbind_test/mr/matchinglayout/A.java | 2 + .../src/mrbind_test/mr/matchinglayout/B.java | 1 + .../mr/matchinglayout/Functions.java | 6 +- .../src/mrbind_test/mr/membervars/A.java | 10 + .../mr/nestedtemplateinst/A_int32_t.java | 3 + .../A_int32_t_AA_float.java | 3 + .../src/mrbind_test/mr/nestedtypes/A.java | 8 + .../src/mrbind_test/mr/nestedtypes/A_B.java | 3 + .../mr/omittingtargsandquals/A_float.java | 4 + .../mr/omittingtargsandquals/A_int32_t.java | 5 + .../mr/omittingtargsandquals/Functions.java | 10 +- .../src/mrbind_test/mr/overloadedops/A.java | 45 +++ .../src/mrbind_test/mr/overloadedops/B.java | 3 + .../src/mrbind_test/mr/overloadedops/C.java | 3 + .../src/mrbind_test/mr/overloadedops/D.java | 5 + .../mr/overloadedops/Functions.java | 46 ++- .../mrbind_test/mr/overloads/Functions.java | 16 +- .../src/mrbind_test/mr/phmap/Functions.java | 14 +- .../mrbind_test/mr/signaturefilters/A.java | 3 + .../mrbind_test/mr/signaturefilters/Blah.java | 5 + .../mr/signaturefilters/Functions.java | 12 +- .../src/mrbind_test/mr/staticfuncs/A.java | 6 + .../src/mrbind_test/mr/stdcontainers/A.java | 3 + .../mr/stdcontainers/Functions.java | 41 ++- .../mr/stdcontainers/NonAssignable.java | 4 + .../NonDefaultConstructible.java | 3 + .../mrbind_test/mr/stdexpected/Functions.java | 13 +- .../mr/stdfilesystem/Functions.java | 7 +- .../src/mrbind_test/mr/stdfunction/A.java | 6 + .../mrbind_test/mr/stdfunction/Functions.java | 10 +- .../src/mrbind_test/mr/stdoptional/A.java | 6 + .../src/mrbind_test/mr/stdoptional/B.java | 6 + .../mrbind_test/mr/stdoptional/Functions.java | 22 +- .../src/mrbind_test/mr/stdsharedptr/A.java | 3 + .../mr/stdsharedptr/Functions.java | 42 ++- .../mrbind_test/mr/stdstring/Functions.java | 10 +- .../mr/stdstringview/Functions.java | 10 +- .../mr/stdtuplelike/Functions.java | 14 +- .../src/mrbind_test/mr/stduniqueptr/A.java | 3 + .../mr/stduniqueptr/Functions.java | 35 +- .../mrbind_test/mr/stdvariant/Functions.java | 6 +- .../src/mrbind_test/mr/tags/Functions.java | 7 +- .../ClassTemplate_uint64_t.java | 8 + .../mr/testsimpletypes/Functions.java | 51 ++- .../mrbind_test/mr/testsizet/A_uint64_t.java | 4 + .../mrbind_test/mr/testsizet/Functions.java | 8 +- .../mr/typedefsintemplates/A_int32_t.java | 4 + .../mr/typedefsintemplates/B_int32_t.java | 3 + .../B_int32_t_BB_float.java | 5 + .../mr/typedefsintemplates/Functions.java | 3 +- .../src/mrbind_test/mr/usingdecls/A.java | 11 + .../src/mrbind_test/mr/usingdecls/B.java | 42 +++ .../phmap/phmap_btree_map_int32_t_float.java | 18 + ...tree_map_int32_t_float_const_iterator.java | 9 + ...hmap_btree_map_int32_t_float_iterator.java | 8 + .../phmap_btree_multimap_int32_t_float.java | 17 + ...multimap_int32_t_float_const_iterator.java | 9 + ...btree_multimap_int32_t_float_iterator.java | 8 + .../phmap/phmap_btree_multiset_int32_t.java | 15 + ...btree_multiset_int32_t_const_iterator.java | 6 + .../phmap/phmap_btree_set_int32_t.java | 15 + ...hmap_btree_set_int32_t_const_iterator.java | 6 + .../phmap_flat_hash_map_int32_t_float.java | 18 + ...hash_map_int32_t_float_const_iterator.java | 8 + ..._flat_hash_map_int32_t_float_iterator.java | 7 + .../phmap/phmap_flat_hash_set_int32_t.java | 15 + ..._flat_hash_set_int32_t_const_iterator.java | 5 + .../phmap_node_hash_map_int32_t_float.java | 18 + ...hash_map_int32_t_float_const_iterator.java | 8 + ..._node_hash_map_int32_t_float_iterator.java | 7 + .../phmap/phmap_node_hash_set_int32_t.java | 15 + ..._node_hash_set_int32_t_const_iterator.java | 5 + ..._parallel_flat_hash_map_int32_t_float.java | 18 + ...hash_map_int32_t_float_const_iterator.java | 8 + ..._flat_hash_map_int32_t_float_iterator.java | 7 + .../phmap_parallel_flat_hash_set_int32_t.java | 15 + ..._flat_hash_set_int32_t_const_iterator.java | 5 + ..._parallel_node_hash_map_int32_t_float.java | 18 + ...hash_map_int32_t_float_const_iterator.java | 8 + ..._node_hash_map_int32_t_float_iterator.java | 7 + .../phmap_parallel_node_hash_set_int32_t.java | 15 + ..._node_hash_set_int32_t_const_iterator.java | 5 + .../src/mrbind_test/CppException.java | 2 +- .../src/mrbind_test/CppObject.java | 2 +- .../src/mrbind_test/CppStruct.java | 2 +- .../src/mrbind_test/Ffi.java | 83 ++++- .../src/mrbind_test/Native.java | 2 +- .../src/mrbind_test/ffi/A/a.java | 5 +- .../std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- .../common/std_shared_ptr_MR_SeparateA.java | 2 +- .../common/std_shared_ptr_MR_SeparateB.java | 2 +- .../AB/common/std_vector_MR_SeparateA.java | 2 +- .../AB/common/std_vector_MR_SeparateB.java | 2 +- ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 2 +- .../src/mrbind_test/ffi/AB_base/ab_base.java | 2 +- .../src/mrbind_test/ffi/B/b.java | 5 +- .../src/mrbind_test/ffi/MR/_1.java | 2 +- .../ffi/MR/test_abstract_classes.java | 5 +- .../ffi/MR/test_adjusting_names.java | 2 +- .../mrbind_test/ffi/MR/test_aggregates.java | 2 +- .../MR/test_arrays_of_incomplete_types.java | 2 +- .../MR/test_arrays_of_incomplete_types_2.java | 2 +- .../src/mrbind_test/ffi/MR/test_bases.java | 21 +- .../mrbind_test/ffi/MR/test_combined_a_b.java | 2 +- .../src/mrbind_test/ffi/MR/test_conv_ops.java | 2 +- .../ffi/MR/test_copy_inherited_members.java | 41 ++- .../src/mrbind_test/ffi/MR/test_csharp.java | 81 +++-- .../ffi/MR/test_custom_preferred_names.java | 2 +- .../ffi/MR/test_declaration_order.java | 2 +- .../mrbind_test/ffi/MR/test_deprecation.java | 2 +- .../MR/test_includes_for_enum_constants.java | 2 +- .../test_includes_for_enum_constants_2.java | 2 +- .../test_includes_for_enum_constants_3.java | 2 +- .../src/mrbind_test/ffi/MR/test_iostream.java | 2 +- .../ffi/MR/test_lifetime_inference.java | 2 +- .../ffi/MR/test_matching_layout.java | 2 +- .../mrbind_test/ffi/MR/test_member_vars.java | 2 +- .../ffi/MR/test_mention_blacklists.java | 2 +- .../MR/test_nested_class_template_inst.java | 2 +- .../mrbind_test/ffi/MR/test_nested_types.java | 2 +- ...test_omitting_template_args_and_quals.java | 2 +- .../ffi/MR/test_overloaded_operators.java | 2 +- .../mrbind_test/ffi/MR/test_overloads.java | 2 +- .../src/mrbind_test/ffi/MR/test_phmap.java | 2 +- .../mrbind_test/ffi/MR/test_simple_types.java | 2 +- .../ffi/MR/test_size_t_ptrdiff_t.java | 2 +- .../ffi/MR/test_static_memberr.java | 2 +- .../ffi/MR/test_std_containers.java | 2 +- .../mrbind_test/ffi/MR/test_std_expected.java | 2 +- .../ffi/MR/test_std_filesystem.java | 2 +- .../mrbind_test/ffi/MR/test_std_function.java | 2 +- .../mrbind_test/ffi/MR/test_std_optional.java | 2 +- .../ffi/MR/test_std_shared_ptr.java | 2 +- .../mrbind_test/ffi/MR/test_std_string.java | 2 +- .../ffi/MR/test_std_string_view.java | 2 +- .../ffi/MR/test_std_tuple_like.java | 2 +- .../ffi/MR/test_std_unique_ptr.java | 2 +- .../src/mrbind_test/ffi/MR/test_tags.java | 2 +- .../ffi/MR/test_typedefs_in_templates.java | 2 +- .../mrbind_test/ffi/MR/test_using_decls.java | 4 +- .../src/mrbind_test/ffi/MR/test_variant.java | 2 +- .../src/mrbind_test/ffi/iostream.java | 2 +- .../ffi/phmap_btree_map_int_float.java | 2 +- .../ffi/phmap_btree_multimap_int_float.java | 2 +- .../ffi/phmap_btree_multiset_int.java | 2 +- .../mrbind_test/ffi/phmap_btree_set_int.java | 2 +- .../ffi/phmap_flat_hash_map_int_float.java | 2 +- .../ffi/phmap_flat_hash_set_int.java | 2 +- .../ffi/phmap_node_hash_map_int_float.java | 2 +- .../ffi/phmap_node_hash_set_int.java | 2 +- ...hmap_parallel_flat_hash_map_int_float.java | 2 +- .../ffi/phmap_parallel_flat_hash_set_int.java | 2 +- ...hmap_parallel_node_hash_map_int_float.java | 2 +- .../ffi/phmap_parallel_node_hash_set_int.java | 2 +- .../ffi/std_array_MR_StdContainers_A_42.java | 2 +- ...ray_MR_StdContainers_NonAssignable_42.java | 2 +- .../src/mrbind_test/ffi/std_array_int_43.java | 2 +- .../ffi/std_array_int_array_4_array_3_5.java | 2 +- ..._deque_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_deque_int.java | 2 +- .../ffi/std_expected_MR_CSharp_E1_float.java | 2 +- ...ected_MR_CSharp_ExposedLayoutSh_float.java | 2 +- ...xpected_MR_CSharp_ExposedLayout_float.java | 2 +- ...d_expected_MR_CSharp_NonTrivial_float.java | 2 +- .../ffi/std_expected_MR_CSharp_SA_float.java | 2 +- .../std_expected_MR_CSharp_Trivial_float.java | 2 +- .../ffi/std_expected_int_float.java | 2 +- .../ffi/std_expected_int_std_string.java | 2 +- .../ffi/std_expected_void_float.java | 2 +- .../mrbind_test/ffi/std_filesystem_path.java | 2 +- ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 4 +- ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 4 +- .../ffi/std_function_MR_StdFunction_A.java | 4 +- ...dFunction_E_from_int_MR_StdFunction_E.java | 4 +- .../src/mrbind_test/ffi/std_function_int.java | 4 +- .../ffi/std_function_int_from_int_int.java | 4 +- .../ffi/std_function_int_from_std_string.java | 4 +- ...n_int_ref_from_int_ref_int_rvalue_ref.java | 4 +- .../ffi/std_function_int_rvalue_ref.java | 4 +- ...td_function_std_string_from_int_float.java | 4 +- .../std_function_std_string_from_int_int.java | 4 +- .../mrbind_test/ffi/std_function_void.java | 4 +- ...d_function_void_from_MR_StdFunction_A.java | 4 +- .../ffi/std_function_void_from_int_int.java | 4 +- .../std_function_void_from_std_string.java | 4 +- ...d_list_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_list_int.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../mrbind_test/ffi/std_map_int_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_multimap_int_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../mrbind_test/ffi/std_multiset_float.java | 2 +- .../src/mrbind_test/ffi/std_multiset_int.java | 2 +- ...td_optional_MR_CSharp_ExposedLayoutSh.java | 2 +- .../std_optional_MR_CSharp_NonTrivial.java | 2 +- .../ffi/std_optional_MR_CSharp_SA.java | 2 +- .../ffi/std_optional_MR_CSharp_Trivial.java | 2 +- .../ffi/std_optional_MR_StdOptional_A.java | 2 +- .../ffi/std_optional_MR_StdOptional_B.java | 2 +- .../ffi/std_optional_MR_StdOptional_E.java | 2 +- .../src/mrbind_test/ffi/std_optional_int.java | 2 +- .../ffi/std_optional_std_string.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_pair_const_int_float.java | 2 +- ...td_pair_const_int_ref_const_float_ref.java | 2 +- ...int_rvalue_ref_const_float_rvalue_ref.java | 2 +- .../mrbind_test/ffi/std_pair_int_float.java | 2 +- .../ffi/std_pair_int_ref_float_ref.java | 2 +- ..._pair_int_rvalue_ref_float_rvalue_ref.java | 2 +- .../ffi/std_pair_int_std_string.java | 2 +- ...td_set_MR_StdContainers_NonAssignable.java | 2 +- .../src/mrbind_test/ffi/std_set_float.java | 2 +- .../src/mrbind_test/ffi/std_set_int.java | 2 +- ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SA.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SB.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SC.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SD.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SE.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SF.java | 2 +- .../ffi/std_shared_ptr_MR_CSharp_SG.java | 2 +- .../ffi/std_shared_ptr_MR_CommonBaseAB.java | 2 +- .../ffi/std_shared_ptr_MR_StdSharedPtr_A.java | 2 +- ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 2 +- ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 2 +- .../std_shared_ptr_const_MR_CSharp_SA.java | 2 +- ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 2 +- ...red_ptr_const_MR_StdSharedPtr_A_array.java | 2 +- ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 2 +- .../ffi/std_shared_ptr_const_int.java | 2 +- .../ffi/std_shared_ptr_const_int_array.java | 2 +- .../std_shared_ptr_const_int_array_42.java | 2 +- .../ffi/std_shared_ptr_const_void.java | 2 +- .../mrbind_test/ffi/std_shared_ptr_int.java | 2 +- .../ffi/std_shared_ptr_int_array.java | 2 +- .../ffi/std_shared_ptr_int_array_42.java | 2 +- .../mrbind_test/ffi/std_shared_ptr_void.java | 2 +- .../src/mrbind_test/ffi/std_string.java | 2 +- .../src/mrbind_test/ffi/std_string_view.java | 2 +- .../src/mrbind_test/ffi/std_tuple.java | 2 +- ...dLayout_const_MR_CSharp_ExposedLayout.java | 2 +- ...ref_const_MR_CSharp_ExposedLayout_ref.java | 2 +- ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 2 +- ...st_float_ref_int_rvalue_ref_flo__22dd.java | 2 +- ...tring_ref_const_std_string_rvalue_ref.java | 2 +- .../ffi/std_tuple_const_int_std_string.java | 2 +- .../ffi/std_tuple_float_double_int_int.java | 2 +- .../src/mrbind_test/ffi/std_tuple_int.java | 2 +- .../mrbind_test/ffi/std_tuple_int_float.java | 2 +- ..._std_string_ref_std_string_rvalue_ref.java | 2 +- .../ffi/std_tuple_int_std_string.java | 2 +- .../ffi/std_unique_ptr_MR_StdUniquePtr_A.java | 2 +- ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 2 +- .../mrbind_test/ffi/std_unique_ptr_int.java | 2 +- .../ffi/std_unique_ptr_int_array.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_unordered_map_int_float.java | 2 +- ..._MR_StdContainers_NonAssignable_float.java | 2 +- .../ffi/std_unordered_multimap_int_float.java | 2 +- ...ltiset_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_multiset_int.java | 2 +- ...ed_set_MR_StdContainers_NonAssignable.java | 2 +- .../ffi/std_unordered_set_int.java | 2 +- .../ffi/std_variant_int_float.java | 2 +- .../ffi/std_variant_int_float_float.java | 2 +- .../ffi/std_variant_int_float_std_string.java | 2 +- .../std_variant_std_monostate_int_float.java | 2 +- ...variant_std_monostate_int_float_float.java | 2 +- .../src/mrbind_test/ffi/std_vector_MR_A.java | 2 +- .../ffi/std_vector_MR_CSharp_A_ptr.java | 2 +- .../std_vector_MR_CSharp_ExposedLayout.java | 2 +- ...vector_MR_StdContainers_NonAssignable.java | 2 +- ...StdContainers_NonDefaultConstructible.java | 2 +- .../ffi/std_vector_const_MR_CSharp_A_ptr.java | 2 +- .../src/mrbind_test/ffi/std_vector_int.java | 2 +- .../mrbind_test/ffi/std_vector_int64_t.java | 2 +- ...td_vector_std_expected_int_std_string.java | 2 +- .../mrbind_test/ffi/std_vector_uint64_t.java | 2 +- .../src/mrbind_test/mr/A.java | 5 + .../src/mrbind_test/mr/CommonBaseAB.java | 2 + .../src/mrbind_test/mr/Functions.java | 8 +- .../src/mrbind_test/mr/SeparateA.java | 62 ++++ .../src/mrbind_test/mr/SeparateB.java | 62 ++++ .../src/mrbind_test/mr/abstractclasses/A.java | 1 + .../src/mrbind_test/mr/abstractclasses/B.java | 1 + .../src/mrbind_test/mr/abstractclasses/C.java | 61 ++++ .../src/mrbind_test/mr/adjustingnames/A.java | 8 + .../mr/adjustingnames/Functions.java | 4 +- .../src/mrbind_test/mr/aggregates/A.java | 8 + .../src/mrbind_test/mr/aggregates/B.java | 3 + .../src/mrbind_test/mr/aggregates/C.java | 20 ++ .../src/mrbind_test/mr/aggregates/D.java | 22 ++ .../src/mrbind_test/mr/aggregates/E.java | 23 ++ .../aggregates/NonDefaultConstructible.java | 2 + .../src/mrbind_test/mr/bases/A.java | 3 + .../src/mrbind_test/mr/bases/B.java | 43 +++ .../src/mrbind_test/mr/bases/B2.java | 83 +++++ .../src/mrbind_test/mr/bases/C.java | 43 +++ .../src/mrbind_test/mr/bases/D.java | 3 + .../src/mrbind_test/mr/bases/D2.java | 3 + .../src/mrbind_test/mr/bases/D3.java | 3 + .../src/mrbind_test/mr/bases/E.java | 3 + .../src/mrbind_test/mr/bases/F.java | 43 +++ .../src/mrbind_test/mr/bases/G.java | 43 +++ .../src/mrbind_test/mr/bases/H.java | 83 +++++ .../src/mrbind_test/mr/bases/I.java | 63 ++++ .../src/mrbind_test/mr/convops/A.java | 4 + .../mr/copyinheritedmembers/A.java | 11 + .../mr/copyinheritedmembers/B.java | 11 + .../mr/copyinheritedmembers/C.java | 83 +++++ .../mr/copyinheritedmembers/D.java | 50 +++ .../mr/copyinheritedmembers/E.java | 123 +++++++ .../mr/copyinheritedmembers/F.java | 123 +++++++ .../mr/copyinheritedmembers/G.java | 30 ++ .../mr/copyinheritedmembers/H.java | 70 ++++ .../mr/copyinheritedmembers/I.java | 70 ++++ .../mr/copyinheritedmembers/J.java | 50 +++ .../mr/copyinheritedmembers/K.java | 3 + .../mr/copyinheritedmembers/L.java | 3 + .../mr/copyinheritedmembers/M.java | 50 +++ .../mr/copyinheritedmembers/N.java | 90 +++++ .../mr/copyinheritedmembers/O.java | 130 +++++++ .../src/mrbind_test/mr/cs/Functions.java | 114 +++++- .../cs/std_array_MR_StdContainers_A_42.java | 11 + ...ray_MR_StdContainers_NonAssignable_42.java | 9 + ..._deque_MR_StdContainers_NonAssignable.java | 27 ++ ...ntainers_NonAssignable_const_iterator.java | 8 + ..._StdContainers_NonAssignable_iterator.java | 7 + .../src/mrbind_test/mr/cs/std_deque_int.java | 36 ++ .../mr/cs/std_deque_int_const_iterator.java | 8 + .../mr/cs/std_deque_int_iterator.java | 7 + .../cs/std_expected_MR_CSharp_E1_float.java | 8 + ...ected_MR_CSharp_ExposedLayoutSh_float.java | 8 + ...xpected_MR_CSharp_ExposedLayout_float.java | 8 + ...d_expected_MR_CSharp_NonTrivial_float.java | 8 + .../cs/std_expected_MR_CSharp_SA_float.java | 8 + .../std_expected_MR_CSharp_Trivial_float.java | 8 + .../mr/cs/std_expected_int_float.java | 8 + .../mr/cs/std_expected_int_std_string.java | 8 + .../mr/cs/std_expected_void_float.java | 7 + .../mr/cs/std_filesystem_path.java | 6 + ...nction_MR_CSharp_E1_from_MR_CSharp_E1.java | 67 ++++ ...LayoutC_from_MR_CSharp_ExposedLayoutC.java | 67 ++++ .../mr/cs/std_function_MR_StdFunction_A.java | 68 ++++ ...dFunction_E_from_int_MR_StdFunction_E.java | 67 ++++ .../mrbind_test/mr/cs/std_function_int.java | 67 ++++ .../mr/cs/std_function_int_from_int_int.java | 67 ++++ .../cs/std_function_int_from_std_string.java | 67 ++++ ...n_int_ref_from_int_ref_int_rvalue_ref.java | 67 ++++ .../mr/cs/std_function_int_rvalue_ref.java | 67 ++++ ...td_function_std_string_from_int_float.java | 68 ++++ .../std_function_std_string_from_int_int.java | 68 ++++ .../mrbind_test/mr/cs/std_function_void.java | 65 ++++ ...d_function_void_from_MR_StdFunction_A.java | 65 ++++ .../mr/cs/std_function_void_from_int_int.java | 65 ++++ .../cs/std_function_void_from_std_string.java | 65 ++++ ...d_list_MR_StdContainers_NonAssignable.java | 28 ++ ...ntainers_NonAssignable_const_iterator.java | 7 + ..._StdContainers_NonAssignable_iterator.java | 6 + .../src/mrbind_test/mr/cs/std_list_int.java | 30 ++ .../mr/cs/std_list_int_const_iterator.java | 7 + .../mr/cs/std_list_int_iterator.java | 6 + ..._MR_StdContainers_NonAssignable_float.java | 18 + ...rs_NonAssignable_float_const_iterator.java | 9 + ...ntainers_NonAssignable_float_iterator.java | 8 + .../mrbind_test/mr/cs/std_map_int_float.java | 18 + .../cs/std_map_int_float_const_iterator.java | 9 + .../mr/cs/std_map_int_float_iterator.java | 8 + ..._MR_StdContainers_NonAssignable_float.java | 17 + ...rs_NonAssignable_float_const_iterator.java | 9 + ...ntainers_NonAssignable_float_iterator.java | 8 + .../mr/cs/std_multimap_int_float.java | 17 + ...std_multimap_int_float_const_iterator.java | 9 + .../cs/std_multimap_int_float_iterator.java | 8 + ...ltiset_MR_StdContainers_NonAssignable.java | 13 + ...ntainers_NonAssignable_const_iterator.java | 6 + .../mrbind_test/mr/cs/std_multiset_float.java | 15 + .../cs/std_multiset_float_const_iterator.java | 6 + .../mrbind_test/mr/cs/std_multiset_int.java | 15 + .../cs/std_multiset_int_const_iterator.java | 6 + ...td_optional_MR_CSharp_ExposedLayoutSh.java | 8 + .../cs/std_optional_MR_CSharp_NonTrivial.java | 8 + .../mr/cs/std_optional_MR_CSharp_SA.java | 8 + .../mr/cs/std_optional_MR_CSharp_Trivial.java | 8 + .../mr/cs/std_optional_MR_StdOptional_A.java | 8 + .../mr/cs/std_optional_MR_StdOptional_B.java | 8 + .../mr/cs/std_optional_MR_StdOptional_E.java | 8 + .../mrbind_test/mr/cs/std_optional_int.java | 8 + .../mr/cs/std_optional_std_string.java | 8 + .../std_pair_MR_SeparateA_MR_SeparateB.java | 7 + ..._MR_StdContainers_NonAssignable_float.java | 5 + .../mr/cs/std_pair_const_int_float.java | 6 + ...td_pair_const_int_ref_const_float_ref.java | 4 + ...int_rvalue_ref_const_float_rvalue_ref.java | 4 + .../mrbind_test/mr/cs/std_pair_int_float.java | 8 + .../mr/cs/std_pair_int_ref_float_ref.java | 3 + ..._pair_int_rvalue_ref_float_rvalue_ref.java | 4 + .../mr/cs/std_pair_int_std_string.java | 8 + ...td_set_MR_StdContainers_NonAssignable.java | 13 + ...ntainers_NonAssignable_const_iterator.java | 6 + .../src/mrbind_test/mr/cs/std_set_float.java | 15 + .../mr/cs/std_set_float_const_iterator.java | 6 + .../src/mrbind_test/mr/cs/std_set_int.java | 15 + .../mr/cs/std_set_int_const_iterator.java | 6 + ..._shared_ptr_MR_CSharp_ExposedLayoutSh.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SA.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SB.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SC.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SD.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SE.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SF.java | 16 + .../mr/cs/std_shared_ptr_MR_CSharp_SG.java | 15 + .../mr/cs/std_shared_ptr_MR_CommonBaseAB.java | 16 + .../mr/cs/std_shared_ptr_MR_SeparateA.java | 16 + .../mr/cs/std_shared_ptr_MR_SeparateB.java | 16 + .../cs/std_shared_ptr_MR_StdSharedPtr_A.java | 16 + ...td_shared_ptr_MR_StdSharedPtr_A_array.java | 17 + ...shared_ptr_MR_StdSharedPtr_A_array_42.java | 15 + .../cs/std_shared_ptr_const_MR_CSharp_SA.java | 18 + ...td_shared_ptr_const_MR_StdSharedPtr_A.java | 18 + ...red_ptr_const_MR_StdSharedPtr_A_array.java | 19 + ..._ptr_const_MR_StdSharedPtr_A_array_42.java | 17 + .../mr/cs/std_shared_ptr_const_int.java | 18 + .../mr/cs/std_shared_ptr_const_int_array.java | 19 + .../cs/std_shared_ptr_const_int_array_42.java | 17 + .../mr/cs/std_shared_ptr_const_void.java | 13 + .../mrbind_test/mr/cs/std_shared_ptr_int.java | 16 + .../mr/cs/std_shared_ptr_int_array.java | 17 + .../mr/cs/std_shared_ptr_int_array_42.java | 15 + .../mr/cs/std_shared_ptr_void.java | 11 + .../src/mrbind_test/mr/cs/std_string.java | 10 + .../mrbind_test/mr/cs/std_string_view.java | 8 + .../src/mrbind_test/mr/cs/std_tuple.java | 3 + ...dLayout_const_MR_CSharp_ExposedLayout.java | 6 + ...ref_const_MR_CSharp_ExposedLayout_ref.java | 3 + ...st_MR_CSharp_ExposedLayout_rvalue_ref.java | 4 + ...at_ref_int_rvalue_ref_float__e0da444a.java | 11 + ...tring_ref_const_std_string_rvalue_ref.java | 6 + .../mr/cs/std_tuple_const_int_std_string.java | 6 + .../mr/cs/std_tuple_float_double_int_int.java | 12 + .../src/mrbind_test/mr/cs/std_tuple_int.java | 6 + .../mr/cs/std_tuple_int_float.java | 8 + ..._std_string_ref_std_string_rvalue_ref.java | 5 + .../mr/cs/std_tuple_int_std_string.java | 8 + .../cs/std_unique_ptr_MR_StdUniquePtr_A.java | 7 + ...td_unique_ptr_MR_StdUniquePtr_A_array.java | 8 + .../mrbind_test/mr/cs/std_unique_ptr_int.java | 7 + .../mr/cs/std_unique_ptr_int_array.java | 8 + ..._MR_StdContainers_NonAssignable_float.java | 18 + ...rs_NonAssignable_float_const_iterator.java | 8 + ...ntainers_NonAssignable_float_iterator.java | 7 + .../mr/cs/std_unordered_map_int_float.java | 18 + ...nordered_map_int_float_const_iterator.java | 8 + .../std_unordered_map_int_float_iterator.java | 7 + ..._MR_StdContainers_NonAssignable_float.java | 17 + ...rs_NonAssignable_float_const_iterator.java | 8 + ...ntainers_NonAssignable_float_iterator.java | 7 + .../cs/std_unordered_multimap_int_float.java | 17 + ...red_multimap_int_float_const_iterator.java | 8 + ...unordered_multimap_int_float_iterator.java | 7 + ...ltiset_MR_StdContainers_NonAssignable.java | 12 + ...ntainers_NonAssignable_const_iterator.java | 5 + .../mr/cs/std_unordered_multiset_int.java | 15 + ...unordered_multiset_int_const_iterator.java | 5 + ...ed_set_MR_StdContainers_NonAssignable.java | 12 + ...ntainers_NonAssignable_const_iterator.java | 5 + .../mr/cs/std_unordered_set_int.java | 15 + .../std_unordered_set_int_const_iterator.java | 5 + .../mr/cs/std_variant_int_float.java | 12 + .../mr/cs/std_variant_int_float_float.java | 16 + .../cs/std_variant_int_float_std_string.java | 16 + .../std_variant_std_monostate_int_float.java | 15 + ...variant_std_monostate_int_float_float.java | 19 + .../mrbind_test/mr/cs/std_vector_MR_A.java | 35 ++ .../mr/cs/std_vector_MR_A_const_iterator.java | 8 + .../mr/cs/std_vector_MR_A_iterator.java | 7 + .../mr/cs/std_vector_MR_CSharp_A_ptr.java | 35 ++ ...vector_MR_CSharp_A_ptr_const_iterator.java | 8 + .../std_vector_MR_CSharp_A_ptr_iterator.java | 7 + .../std_vector_MR_CSharp_ExposedLayout.java | 39 ++ ...R_CSharp_ExposedLayout_const_iterator.java | 8 + ...ctor_MR_CSharp_ExposedLayout_iterator.java | 7 + .../mr/cs/std_vector_MR_SeparateA.java | 34 ++ ...td_vector_MR_SeparateA_const_iterator.java | 8 + .../cs/std_vector_MR_SeparateA_iterator.java | 7 + .../mr/cs/std_vector_MR_SeparateB.java | 34 ++ ...td_vector_MR_SeparateB_const_iterator.java | 8 + .../cs/std_vector_MR_SeparateB_iterator.java | 7 + ...vector_MR_StdContainers_NonAssignable.java | 28 ++ ...ntainers_NonAssignable_const_iterator.java | 8 + ..._StdContainers_NonAssignable_iterator.java | 7 + ...StdContainers_NonDefaultConstructible.java | 34 ++ ...onDefaultConstructible_const_iterator.java | 8 + ...ners_NonDefaultConstructible_iterator.java | 7 + .../cs/std_vector_const_MR_CSharp_A_ptr.java | 35 ++ ..._const_MR_CSharp_A_ptr_const_iterator.java | 8 + ...vector_const_MR_CSharp_A_ptr_iterator.java | 7 + .../src/mrbind_test/mr/cs/std_vector_int.java | 39 ++ .../mrbind_test/mr/cs/std_vector_int64_t.java | 39 ++ .../cs/std_vector_int64_t_const_iterator.java | 8 + .../mr/cs/std_vector_int64_t_iterator.java | 7 + .../mr/cs/std_vector_int_const_iterator.java | 8 + .../mr/cs/std_vector_int_iterator.java | 7 + ...td_vector_std_expected_int_std_string.java | 35 ++ ...xpected_int_std_string_const_iterator.java | 8 + ..._std_expected_int_std_string_iterator.java | 7 + ...or_std_pair_MR_SeparateA_MR_SeparateB.java | 34 ++ ...SeparateA_MR_SeparateB_const_iterator.java | 8 + ...ir_MR_SeparateA_MR_SeparateB_iterator.java | 7 + .../mr/cs/std_vector_uint64_t.java | 39 ++ .../std_vector_uint64_t_const_iterator.java | 8 + .../mr/cs/std_vector_uint64_t_iterator.java | 7 + .../src/mrbind_test/mr/csharp/A.java | 10 + .../mr/csharp/AmbiguousTemplates.java | 10 + .../mrbind_test/mr/csharp/ArrayMembers.java | 20 ++ .../src/mrbind_test/mr/csharp/B.java | 71 ++++ .../src/mrbind_test/mr/csharp/C.java | 56 ++- .../src/mrbind_test/mr/csharp/CallOp.java | 5 + .../mr/csharp/ClassMemberPointersBool.java | 14 + .../mr/csharp/ClassMemberPointersClass.java | 14 + .../mr/csharp/ClassMemberPointersExposed.java | 14 + .../mr/csharp/ClassMemberPointersUshort.java | 14 + .../mr/csharp/ConstNonconstConflicts.java | 10 + .../src/mrbind_test/mr/csharp/ConvCtor.java | 8 + .../mr/csharp/ConvCtorCopyButNoMove.java | 3 + .../mr/csharp/ConvCtorExposed.java | 1 + .../mr/csharp/ConvCtorNonTrivial.java | 4 + .../csharp/ConvCtorNonTrivialRestricted.java | 3 + .../mr/csharp/ConvCtorTrivial.java | 4 + .../mr/csharp/ConvCtorWithDefArg.java | 3 + .../src/mrbind_test/mr/csharp/ConvOp.java | 5 + .../mrbind_test/mr/csharp/ConvOpToRef.java | 6 + .../src/mrbind_test/mr/csharp/D.java | 5 + .../src/mrbind_test/mr/csharp/E.java | 5 + .../src/mrbind_test/mr/csharp/EqualityA.java | 6 + .../src/mrbind_test/mr/csharp/EqualityB.java | 6 + .../src/mrbind_test/mr/csharp/EqualityC.java | 6 + .../src/mrbind_test/mr/csharp/EqualityD.java | 4 + .../src/mrbind_test/mr/csharp/EqualityE.java | 4 + .../mrbind_test/mr/csharp/ExposedLayout.java | 10 + .../mrbind_test/mr/csharp/ExposedLayoutB.java | 4 +- .../mr/csharp/ExposedLayoutSh.java | 19 +- .../src/mrbind_test/mr/csharp/F.java | 154 ++++++++ .../src/mrbind_test/mr/csharp/Functions.java | 335 +++++++++++++++++- .../src/mrbind_test/mr/csharp/G.java | 134 +++++++ .../src/mrbind_test/mr/csharp/IncrDecrA.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrB.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrC.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrD.java | 7 + .../src/mrbind_test/mr/csharp/IncrDecrE.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrF.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrG.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrH.java | 6 + .../src/mrbind_test/mr/csharp/IncrDecrI.java | 3 + .../src/mrbind_test/mr/csharp/IndexerA.java | 7 + .../src/mrbind_test/mr/csharp/IndexerB.java | 9 + .../src/mrbind_test/mr/csharp/IndexerC.java | 5 + .../src/mrbind_test/mr/csharp/IterableA.java | 7 + .../src/mrbind_test/mr/csharp/IterableB.java | 7 + .../src/mrbind_test/mr/csharp/IterableC.java | 9 + .../src/mrbind_test/mr/csharp/IterableD.java | 5 + .../src/mrbind_test/mr/csharp/IterableE.java | 5 + .../src/mrbind_test/mr/csharp/IterableF.java | 5 + .../src/mrbind_test/mr/csharp/IterableG.java | 13 +- .../src/mrbind_test/mr/csharp/IterableH.java | 23 +- .../src/mrbind_test/mr/csharp/IterableI.java | 17 +- .../src/mrbind_test/mr/csharp/IterableJ.java | 7 + .../src/mrbind_test/mr/csharp/IterableK.java | 7 + .../mrbind_test/mr/csharp/IterableK_Iter.java | 9 + .../mr/csharp/IterableK_Sentinel.java | 6 + .../mrbind_test/mr/csharp/IterableL_int.java | 7 + .../src/mrbind_test/mr/csharp/LifetimesA.java | 8 + .../src/mrbind_test/mr/csharp/LifetimesB.java | 9 + .../src/mrbind_test/mr/csharp/LifetimesC.java | 6 + .../src/mrbind_test/mr/csharp/LifetimesD.java | 15 +- .../src/mrbind_test/mr/csharp/LifetimesE.java | 10 +- .../mrbind_test/mr/csharp/NameConflicts.java | 9 + .../mr/csharp/NameConflictsExposed.java | 1 + .../mr/csharp/NameConflicts_A.java | 3 + .../mr/csharp/NonCopyableClassByValueOps.java | 3 + .../src/mrbind_test/mr/csharp/NonTrivial.java | 3 + .../mr/csharp/NonTrivialClassOps.java | 4 + .../mr/csharp/NonTrivialDerived.java | 3 + .../src/mrbind_test/mr/csharp/Outer.java | 4 + .../mrbind_test/mr/csharp/Outer_Inner.java | 4 + .../mrbind_test/mr/csharp/RelationalA.java | 7 + .../mrbind_test/mr/csharp/RelationalB.java | 7 + .../mrbind_test/mr/csharp/RelationalC.java | 6 + .../mrbind_test/mr/csharp/RelationalD.java | 7 + .../mrbind_test/mr/csharp/RelationalE.java | 17 +- .../mrbind_test/mr/csharp/RelationalF.java | 23 +- .../src/mrbind_test/mr/csharp/SA.java | 11 +- .../src/mrbind_test/mr/csharp/SB.java | 8 +- .../src/mrbind_test/mr/csharp/SC.java | 85 +++++ .../src/mrbind_test/mr/csharp/SD.java | 3 + .../src/mrbind_test/mr/csharp/SE.java | 6 + .../src/mrbind_test/mr/csharp/SF.java | 105 ++++++ .../mrbind_test/mr/csharp/StaticOpsLhsA.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsB.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsC.java | 2 + .../mrbind_test/mr/csharp/StaticOpsLhsD.java | 2 + .../mrbind_test/mr/csharp/StaticOpsLhsE.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsF.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsG.java | 3 + .../mrbind_test/mr/csharp/StaticOpsLhsH.java | 3 + .../mr/csharp/StaticOpsMixedLhs.java | 3 + .../mr/csharp/StaticOpsMixedRhs.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsA.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsB.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsC.java | 2 + .../mrbind_test/mr/csharp/StaticOpsRhsD.java | 2 + .../mrbind_test/mr/csharp/StaticOpsRhsE.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsF.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsG.java | 3 + .../mrbind_test/mr/csharp/StaticOpsRhsH.java | 3 + .../mr/csharp/StringConvFsPath.java | 4 + .../mr/csharp/StringConvString.java | 4 + .../mr/csharp/StringConvStringView.java | 4 + .../mrbind_test/mr/csharp/TestConstness.java | 5 + .../src/mrbind_test/mr/csharp/TestFields.java | 22 ++ .../src/mrbind_test/mr/csharp/TestOpsA.java | 64 +++- .../src/mrbind_test/mr/csharp/TestOpsB.java | 62 +++- .../src/mrbind_test/mr/csharp/TestOpsC.java | 37 ++ .../mr/csharp/TestStdFunction.java | 19 + .../src/mrbind_test/mr/csharp/Trivial.java | 3 + .../mrbind_test/mr/csharp/TrivialDerived.java | 3 + .../mrbind_test/mr/customprefnames/Af.java | 3 + .../mrbind_test/mr/customprefnames/Ai.java | 3 + .../mr/customprefnames/Functions.java | 3 +- .../src/mrbind_test/mr/declorder/A.java | 2 + .../src/mrbind_test/mr/declorder/A_B.java | 2 + .../src/mrbind_test/mr/declorder/C_false.java | 1 + .../src/mrbind_test/mr/declorder/C_true.java | 1 + .../mrbind_test/mr/deprecation/Functions.java | 4 +- .../A_MR_IncludesForEnumConstants_E_e1.java | 3 + .../includesforenumconstants/Functions.java | 3 +- .../mr/incompletearrayelemtype/Functions.java | 4 +- .../src/mrbind_test/mr/iostream/A.java | 3 + .../mrbind_test/mr/iostream/Functions.java | 4 +- .../mrbind_test/mr/lifetimeinference/A.java | 8 + .../mrbind_test/mr/lifetimeinference/B.java | 6 + .../mrbind_test/mr/lifetimeinference/C.java | 3 + .../mr/lifetimeinference/Functions.java | 6 +- .../src/mrbind_test/mr/matchinglayout/A.java | 2 + .../src/mrbind_test/mr/matchinglayout/B.java | 1 + .../mr/matchinglayout/Functions.java | 6 +- .../src/mrbind_test/mr/membervars/A.java | 10 + .../mr/nestedtemplateinst/A_int.java | 3 + .../mr/nestedtemplateinst/A_int_AA_float.java | 3 + .../src/mrbind_test/mr/nestedtypes/A.java | 8 + .../src/mrbind_test/mr/nestedtypes/A_B.java | 3 + .../mr/omittingtargsandquals/A_float.java | 4 + .../mr/omittingtargsandquals/A_int.java | 5 + .../mr/omittingtargsandquals/Functions.java | 10 +- .../src/mrbind_test/mr/overloadedops/A.java | 45 +++ .../src/mrbind_test/mr/overloadedops/B.java | 3 + .../src/mrbind_test/mr/overloadedops/C.java | 3 + .../src/mrbind_test/mr/overloadedops/D.java | 5 + .../mr/overloadedops/Functions.java | 46 ++- .../mrbind_test/mr/overloads/Functions.java | 16 +- .../src/mrbind_test/mr/phmap/Functions.java | 14 +- .../mrbind_test/mr/signaturefilters/A.java | 3 + .../mrbind_test/mr/signaturefilters/Blah.java | 5 + .../mr/signaturefilters/Functions.java | 12 +- .../src/mrbind_test/mr/staticfuncs/A.java | 6 + .../src/mrbind_test/mr/stdcontainers/A.java | 3 + .../mr/stdcontainers/Functions.java | 41 ++- .../mr/stdcontainers/NonAssignable.java | 4 + .../NonDefaultConstructible.java | 3 + .../mrbind_test/mr/stdexpected/Functions.java | 13 +- .../mr/stdfilesystem/Functions.java | 7 +- .../src/mrbind_test/mr/stdfunction/A.java | 6 + .../mrbind_test/mr/stdfunction/Functions.java | 10 +- .../src/mrbind_test/mr/stdoptional/A.java | 6 + .../src/mrbind_test/mr/stdoptional/B.java | 6 + .../mrbind_test/mr/stdoptional/Functions.java | 22 +- .../src/mrbind_test/mr/stdsharedptr/A.java | 3 + .../mr/stdsharedptr/Functions.java | 42 ++- .../mrbind_test/mr/stdstring/Functions.java | 10 +- .../mr/stdstringview/Functions.java | 10 +- .../mr/stdtuplelike/Functions.java | 14 +- .../src/mrbind_test/mr/stduniqueptr/A.java | 3 + .../mr/stduniqueptr/Functions.java | 35 +- .../mrbind_test/mr/stdvariant/Functions.java | 6 +- .../src/mrbind_test/mr/tags/Functions.java | 7 +- .../ClassTemplate_uint64_t.java | 8 + .../mr/testsimpletypes/Functions.java | 51 ++- .../mrbind_test/mr/testsizet/A_uint64_t.java | 4 + .../mrbind_test/mr/testsizet/Functions.java | 8 +- .../mr/typedefsintemplates/A_int.java | 4 + .../mr/typedefsintemplates/B_int.java | 3 + .../typedefsintemplates/B_int_BB_float.java | 5 + .../mr/typedefsintemplates/Functions.java | 3 +- .../src/mrbind_test/mr/usingdecls/A.java | 11 + .../src/mrbind_test/mr/usingdecls/B.java | 50 +++ .../phmap/phmap_btree_map_int_float.java | 18 + ...ap_btree_map_int_float_const_iterator.java | 9 + .../phmap_btree_map_int_float_iterator.java | 8 + .../phmap/phmap_btree_multimap_int_float.java | 17 + ...ree_multimap_int_float_const_iterator.java | 9 + ...map_btree_multimap_int_float_iterator.java | 8 + .../phmap/phmap_btree_multiset_int.java | 15 + ...map_btree_multiset_int_const_iterator.java | 6 + .../phmap/phmap_btree_set_int.java | 15 + .../phmap_btree_set_int_const_iterator.java | 6 + .../phmap/phmap_flat_hash_map_int_float.java | 18 + ...lat_hash_map_int_float_const_iterator.java | 8 + ...hmap_flat_hash_map_int_float_iterator.java | 7 + .../phmap/phmap_flat_hash_set_int.java | 15 + ...hmap_flat_hash_set_int_const_iterator.java | 5 + .../phmap/phmap_node_hash_map_int_float.java | 18 + ...ode_hash_map_int_float_const_iterator.java | 8 + ...hmap_node_hash_map_int_float_iterator.java | 7 + .../phmap/phmap_node_hash_set_int.java | 15 + ...hmap_node_hash_set_int_const_iterator.java | 5 + ...hmap_parallel_flat_hash_map_int_float.java | 18 + ...lat_hash_map_int_float_const_iterator.java | 8 + ...llel_flat_hash_map_int_float_iterator.java | 7 + .../phmap_parallel_flat_hash_set_int.java | 15 + ...llel_flat_hash_set_int_const_iterator.java | 5 + ...hmap_parallel_node_hash_map_int_float.java | 18 + ...ode_hash_map_int_float_const_iterator.java | 8 + ...llel_node_hash_map_int_float_iterator.java | 7 + .../phmap_parallel_node_hash_set_int.java | 15 + ...llel_node_hash_set_int_const_iterator.java | 5 + 1606 files changed, 19464 insertions(+), 985 deletions(-) diff --git a/test/output_java/src/mrbind_test/CppException.java b/test/output_java/src/mrbind_test/CppException.java index 5969c872..3f1347df 100644 --- a/test/output_java/src/mrbind_test/CppException.java +++ b/test/output_java/src/mrbind_test/CppException.java @@ -1,6 +1,6 @@ package mrbind_test; -/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +/** A C++ exception thrown by the C bindings. */ public class CppException extends RuntimeException { private static final long serialVersionUID = 1; diff --git a/test/output_java/src/mrbind_test/CppObject.java b/test/output_java/src/mrbind_test/CppObject.java index 2909e68e..a945b109 100644 --- a/test/output_java/src/mrbind_test/CppObject.java +++ b/test/output_java/src/mrbind_test/CppObject.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * The base class of the wrappers of the opaque C++ classes. * * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), * or is a reference to an object owned by something else. References returned by methods keep their owner alive. diff --git a/test/output_java/src/mrbind_test/CppStruct.java b/test/output_java/src/mrbind_test/CppStruct.java index 16a3e7c1..b7485a86 100644 --- a/test/output_java/src/mrbind_test/CppStruct.java +++ b/test/output_java/src/mrbind_test/CppStruct.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. * * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), * those returned by reference from the bindings point into memory owned by something else, which they keep alive. diff --git a/test/output_java/src/mrbind_test/Ffi.java b/test/output_java/src/mrbind_test/Ffi.java index aa63fc6b..b7c37f06 100644 --- a/test/output_java/src/mrbind_test/Ffi.java +++ b/test/output_java/src/mrbind_test/Ffi.java @@ -1,6 +1,6 @@ package mrbind_test; -/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +/** The runtime support of the bindings. */ @SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. public final class Ffi { @@ -278,9 +278,88 @@ public static RuntimeException rethrow(Throwable e) return new RuntimeException(e); } - // C++ exceptions are reported by the C bindings through a callback, which stores the message here until the wrapper checks it. - private static final ThreadLocal PENDING_EXCEPTION = new ThreadLocal<>(); + // What the wrapper must throw once the C call returns: a C++ exception message reported by the C bindings (a String), + // or an exception thrown by a Java callback (a Throwable). Per thread, since the C bindings report per thread. + private static final ThreadLocal PENDING = new ThreadLocal<>(); + /** Throws if the last call into the C bindings threw a C++ exception, or a Java callback threw. */ + public static void checkException() + { + Object pending = PENDING.get(); + if (pending == null) + return; + PENDING.remove(); + if (pending instanceof Throwable error) + throw rethrow(error); + throw new CppException((String)pending); + } + + /** Called by the callback trampolines when the Java callable throws. The exception is rethrown by the wrapper that made the C call. */ + public static void callbackFailed(Throwable error) + { + if (PENDING.get() == null) + PENDING.set(error); + } + + /** Creates an upcall stub for a static method of `cls`. The lookup must be able to see the method. */ + public static java.lang.foreign.MemorySegment upcall(java.lang.invoke.MethodHandles.Lookup lookup, Class cls, String name, java.lang.foreign.FunctionDescriptor desc) + { + try + { + return LINKER.upcallStub(lookup.findStatic(cls, name, desc.toMethodType()), desc, java.lang.foreign.Arena.global()); + } + catch (ReflectiveOperationException e) + { + throw new IllegalStateException(e); + } + } + + // The Java callables held by the `std::function` instances, keyed by the ids that are passed to C as the user data pointers. + // Each entry is the callable and its reference count: the copies of a `std::function` share the user data. + private static final java.util.concurrent.ConcurrentHashMap CALLBACKS = new java.util.concurrent.ConcurrentHashMap<>(); + private static final java.util.concurrent.atomic.AtomicLong NEXT_CALLBACK_ID = new java.util.concurrent.atomic.AtomicLong(1); + + /** Registers a callable and returns its user data pointer, with one reference. */ + public static java.lang.foreign.MemorySegment newCallbackState(Object callable) + { + long id = NEXT_CALLBACK_ID.getAndIncrement(); + CALLBACKS.put(id, new Object[]{callable, new java.util.concurrent.atomic.AtomicInteger(1)}); + return java.lang.foreign.MemorySegment.ofAddress(id); + } + + /** The callable registered under a user data pointer. */ + public static Object callbackState(java.lang.foreign.MemorySegment userdata) + { + Object[] entry = CALLBACKS.get(userdata.address()); + if (entry == null) + throw new IllegalStateException("Unknown callback state: " + userdata.address() + "."); + return entry[0]; + } + + // The `userdata_callback` of the C bindings: releases the user data of `this` object, then copies the other one into it, if any. + private static void callbackStateChanged(java.lang.foreign.MemorySegment thisUserdata, java.lang.foreign.MemorySegment otherUserdata) + { + java.lang.foreign.MemorySegment slot = thisUserdata.reinterpret(java.lang.foreign.ValueLayout.ADDRESS.byteSize()); + long current = slot.get(java.lang.foreign.ValueLayout.ADDRESS, 0).address(); + if (current != 0) + { + Object[] entry = CALLBACKS.get(current); + if (entry != null && ((java.util.concurrent.atomic.AtomicInteger)entry[1]).decrementAndGet() == 0) + CALLBACKS.remove(current); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, java.lang.foreign.MemorySegment.NULL); + } + if (otherUserdata.address() != 0) + { + Object[] entry = CALLBACKS.get(otherUserdata.address()); + if (entry != null) + ((java.util.concurrent.atomic.AtomicInteger)entry[1]).incrementAndGet(); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, otherUserdata); + } + } + + public static final java.lang.foreign.MemorySegment CALLBACK_STATE_STUB = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, "callbackStateChanged", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + // C++ exceptions are reported by the C bindings through this callback, which stores the message until the wrapper checks it. private static void exceptionHandler(java.lang.foreign.MemorySegment messages, java.lang.foreign.MemorySegment typeNames, java.lang.foreign.MemorySegment userdata) { StringBuilder text = new StringBuilder(); @@ -294,15 +373,14 @@ private static void exceptionHandler(java.lang.foreign.MemorySegment messages, j text.append('\n'); text.append(message.reinterpret(Long.MAX_VALUE).getString(0)); } - PENDING_EXCEPTION.set(text.toString()); + PENDING.set(text.toString()); } static { try { - java.lang.invoke.MethodHandle handler = java.lang.invoke.MethodHandles.lookup().findStatic(Ffi.class, "exceptionHandler", java.lang.invoke.MethodType.methodType(void.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class, java.lang.foreign.MemorySegment.class)); - java.lang.foreign.MemorySegment stub = LINKER.upcallStub(handler, java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS), java.lang.foreign.Arena.global()); + java.lang.foreign.MemorySegment stub = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, "exceptionHandler", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); downcall("", "MR_C_SetExceptionHandler", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)).invokeExact(stub, java.lang.foreign.MemorySegment.NULL); } catch (Throwable e) @@ -311,15 +389,4 @@ private static void exceptionHandler(java.lang.foreign.MemorySegment messages, j throw new IllegalStateException("Failed to register the C++ exception handler: " + e, e); } } - - /** Throws if the last call into the C bindings threw a C++ exception. */ - public static void checkException() - { - String message = PENDING_EXCEPTION.get(); - if (message != null) - { - PENDING_EXCEPTION.remove(); - throw new CppException(message); - } - } } diff --git a/test/output_java/src/mrbind_test/Native.java b/test/output_java/src/mrbind_test/Native.java index f9d8474e..30d65d27 100644 --- a/test/output_java/src/mrbind_test/Native.java +++ b/test/output_java/src/mrbind_test/Native.java @@ -1,6 +1,6 @@ package mrbind_test; -/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +/** Implemented by the wrappers of native objects. */ public interface Native { /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ diff --git a/test/output_java/src/mrbind_test/ffi/A/a.java b/test/output_java/src/mrbind_test/ffi/A/a.java index 956d4f2f..1c086a02 100644 --- a/test/output_java/src/mrbind_test/ffi/A/a.java +++ b/test/output_java/src/mrbind_test/ffi/A/a.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.A; -/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `A/a`. */ public final class a { private a() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java index 053d5b1a..5fcaed0c 100644 --- a/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java +++ b/test/output_java/src/mrbind_test/ffi/AB_base/ab_base.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB_base; -/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB_base/ab_base`. */ public final class ab_base { private ab_base() {} diff --git a/test/output_java/src/mrbind_test/ffi/B/b.java b/test/output_java/src/mrbind_test/ffi/B/b.java index 412f8e87..f98dda1c 100644 --- a/test/output_java/src/mrbind_test/ffi/B/b.java +++ b/test/output_java/src/mrbind_test/ffi/B/b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.B; -/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `B/b`. */ public final class b { private b() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("", "MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/MR/_1.java b/test/output_java/src/mrbind_test/ffi/MR/_1.java index 0b883a82..35518947 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/_1.java +++ b/test/output_java/src/mrbind_test/ffi/MR/_1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/1`. */ public final class _1 { private _1() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java index a9e022e4..3bce5034 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ public final class test_abstract_classes { private test_abstract_classes() {} @@ -14,5 +14,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java index ce43ae56..15ccc6ff 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. */ public final class test_adjusting_names { private test_adjusting_names() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java index 33cc0d87..e6078ca4 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_aggregates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_aggregates`. */ public final class test_aggregates { private test_aggregates() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java index e61dea09..d332e12e 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. */ public final class test_arrays_of_incomplete_types { private test_arrays_of_incomplete_types() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java index c992d055..d6f17c03 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. */ public final class test_arrays_of_incomplete_types_2 { private test_arrays_of_incomplete_types_2() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java/src/mrbind_test/ffi/MR/test_bases.java index 6d464b87..aead1bba 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_bases.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_bases.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_bases`. */ public final class test_bases { private test_bases() {} @@ -17,14 +17,22 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -45,17 +53,28 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java index 9e52d501..a2a94fa6 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. */ public final class test_combined_a_b { private test_combined_a_b() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java index ede36e45..7269189d 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_conv_ops`. */ public final class test_conv_ops { private test_conv_ops() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java index f56a456d..3542c3c5 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. */ public final class test_copy_inherited_members { private test_copy_inherited_members() {} @@ -41,6 +41,10 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -54,14 +58,28 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -75,6 +93,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -88,6 +107,9 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -101,6 +123,9 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -114,6 +139,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -135,6 +162,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -148,6 +177,10 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -161,5 +194,11 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java index e8f62dd4..21dc4403 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_csharp.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_csharp`. */ public final class test_csharp { private test_csharp() {} @@ -408,23 +408,28 @@ private H1() {} public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_B_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); } public static final class H2 { private H2() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_C_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -616,17 +621,17 @@ private H2() {} public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayout_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayout_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_2", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); - public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); } public static final class H3 { private H3() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -649,6 +654,13 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_F_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -664,6 +676,12 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_G_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -809,6 +827,12 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); @@ -827,12 +851,6 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H4 - { - private H4() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); @@ -1015,6 +1033,12 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1033,12 +1057,6 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H5 - { - private H5() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1053,6 +1071,10 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SC_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1072,6 +1094,11 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SF_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1212,6 +1239,12 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1239,12 +1272,6 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H6 - { - private H6() {} - public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java index 46bfd0e7..f66110e9 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. */ public final class test_custom_preferred_names { private test_custom_preferred_names() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java index 2d1c9ac2..2f792da8 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_declaration_order`. */ public final class test_declaration_order { private test_declaration_order() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java index d7791105..be854c6a 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_deprecation.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_deprecation`. */ public final class test_deprecation { private test_deprecation() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java index 6d1a532d..516cd872 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. */ public final class test_includes_for_enum_constants { private test_includes_for_enum_constants() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java index 6d263071..6cd6a94f 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. */ public final class test_includes_for_enum_constants_2 { private test_includes_for_enum_constants_2() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java index 4dc1659c..a6c1db34 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. */ public final class test_includes_for_enum_constants_3 { private test_includes_for_enum_constants_3() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java index 14b90d68..cf32410c 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_iostream`. */ public final class test_iostream { private test_iostream() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java index 72709289..e3d4041b 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. */ public final class test_lifetime_inference { private test_lifetime_inference() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java index e9fb1312..dda299b1 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_matching_layout`. */ public final class test_matching_layout { private test_matching_layout() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java index 480d22f7..80b05b20 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_member_vars.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_member_vars`. */ public final class test_member_vars { private test_member_vars() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java index d101f32e..e429b601 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. */ public final class test_mention_blacklists { private test_mention_blacklists() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java index b63d70c3..663f9224 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. */ public final class test_nested_class_template_inst { private test_nested_class_template_inst() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java index 151f301e..ad966fcf 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_nested_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_types`. */ public final class test_nested_types { private test_nested_types() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java index 528901a3..c45226cd 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. */ public final class test_omitting_template_args_and_quals { private test_omitting_template_args_and_quals() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java index 5a68a556..ce5bdcde 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. */ public final class test_overloaded_operators { private test_overloaded_operators() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java index 9dfcbd14..9b9c285b 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_overloads.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloads`. */ public final class test_overloads { private test_overloads() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java index 03f57869..6d674e77 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_phmap.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_phmap`. */ public final class test_phmap { private test_phmap() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java index 98f1a938..e6a62fc1 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_simple_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_simple_types`. */ public final class test_simple_types { private test_simple_types() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java index 02b41e86..9100e505 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. */ public final class test_size_t_ptrdiff_t { private test_size_t_ptrdiff_t() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java index f1670f9a..d6880507 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_static_memberr`. */ public final class test_static_memberr { private test_static_memberr() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java index cb43f85e..1277fca9 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_containers.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_containers`. */ public final class test_std_containers { private test_std_containers() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java index 91102810..88ec684d 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_expected.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_expected`. */ public final class test_std_expected { private test_std_expected() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java index a1136b31..6f7d572c 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. */ public final class test_std_filesystem { private test_std_filesystem() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java index 0e68fdf2..b8bef6bf 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_function.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_function`. */ public final class test_std_function { private test_std_function() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java index 7350f68b..9484cdac 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_optional.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_optional`. */ public final class test_std_optional { private test_std_optional() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java index 1f445355..c3210bb9 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. */ public final class test_std_shared_ptr { private test_std_shared_ptr() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java index f18d09b9..b4897179 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string`. */ public final class test_std_string { private test_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java index 6f7e95cb..160182b4 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string_view`. */ public final class test_std_string_view { private test_std_string_view() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java index 37f0e2c3..4fc442e3 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. */ public final class test_std_tuple_like { private test_std_tuple_like() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java index 582bbab5..84f400d6 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. */ public final class test_std_unique_ptr { private test_std_unique_ptr() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java/src/mrbind_test/ffi/MR/test_tags.java index b19273f1..ebafd4fd 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_tags.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_tags.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_tags`. */ public final class test_tags { private test_tags() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java index 49fda92e..ae94ef2b 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. */ public final class test_typedefs_in_templates { private test_typedefs_in_templates() {} diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java index 615be225..65430f60 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_using_decls.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ public final class test_using_decls { private test_using_decls() {} @@ -36,5 +36,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java/src/mrbind_test/ffi/MR/test_variant.java index 3c3aae29..97fc13c5 100644 --- a/test/output_java/src/mrbind_test/ffi/MR/test_variant.java +++ b/test/output_java/src/mrbind_test/ffi/MR/test_variant.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_variant`. */ public final class test_variant { private test_variant() {} diff --git a/test/output_java/src/mrbind_test/ffi/iostream.java b/test/output_java/src/mrbind_test/ffi/iostream.java index 1af4cd30..6a3b207f 100644 --- a/test/output_java/src/mrbind_test/ffi/iostream.java +++ b/test/output_java/src/mrbind_test/ffi/iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `iostream`. */ public final class iostream { private iostream() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java index 7a31ffe6..9f9b2230 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. */ public final class phmap_btree_map_int_float { private phmap_btree_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java index baa503ea..cfb57924 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. */ public final class phmap_btree_multimap_int_float { private phmap_btree_multimap_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java index 75986dae..d4b178fa 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. */ public final class phmap_btree_multiset_int { private phmap_btree_multiset_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java index 5baf0fe1..d757cff6 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_btree_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_set_int`. */ public final class phmap_btree_set_int { private phmap_btree_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java index 5749e1a5..08f9e324 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. */ public final class phmap_flat_hash_map_int_float { private phmap_flat_hash_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java index 6d89a195..61ef70a8 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_flat_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. */ public final class phmap_flat_hash_set_int { private phmap_flat_hash_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java index f1cd0c37..6f7a4b4d 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. */ public final class phmap_node_hash_map_int_float { private phmap_node_hash_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java index df37c4b0..37c3d7cd 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_node_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. */ public final class phmap_node_hash_set_int { private phmap_node_hash_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java index b33d014d..f2647cfe 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. */ public final class phmap_parallel_flat_hash_map_int_float { private phmap_parallel_flat_hash_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java index fb82294c..ad7f8e0e 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. */ public final class phmap_parallel_flat_hash_set_int { private phmap_parallel_flat_hash_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java index 591d728e..5a0646eb 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. */ public final class phmap_parallel_node_hash_map_int_float { private phmap_parallel_node_hash_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java index 408c9d3b..19af44c7 100644 --- a/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. */ public final class phmap_parallel_node_hash_set_int { private phmap_parallel_node_hash_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java index 5cc3ac9a..abf67648 100644 --- a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. */ public final class std_array_MR_StdContainers_A_42 { private std_array_MR_StdContainers_A_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java index db4ef900..f60b8bd9 100644 --- a/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. */ public final class std_array_MR_StdContainers_NonAssignable_42 { private std_array_MR_StdContainers_NonAssignable_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_int_43.java b/test/output_java/src/mrbind_test/ffi/std_array_int_43.java index 3706ce9b..fd04e97c 100644 --- a/test/output_java/src/mrbind_test/ffi/std_array_int_43.java +++ b/test/output_java/src/mrbind_test/ffi/std_array_int_43.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int_43`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int_43`. */ public final class std_array_int_43 { private std_array_int_43() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java b/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java index 0fc9823b..dd711b89 100644 --- a/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java +++ b/test/output_java/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. */ public final class std_array_int_array_4_array_3_5 { private std_array_int_array_4_array_3_5() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java index 5311eb69..6d9c4748 100644 --- a/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. */ public final class std_deque_MR_StdContainers_NonAssignable { private std_deque_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_deque_int.java b/test/output_java/src/mrbind_test/ffi/std_deque_int.java index ecc84603..bc47f784 100644 --- a/test/output_java/src/mrbind_test/ffi/std_deque_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_deque_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_int`. */ public final class std_deque_int { private std_deque_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java index 6ddf0f45..f36233ae 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. */ public final class std_expected_MR_CSharp_E1_float { private std_expected_MR_CSharp_E1_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java index b2cc94ec..07834cce 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. */ public final class std_expected_MR_CSharp_ExposedLayoutSh_float { private std_expected_MR_CSharp_ExposedLayoutSh_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java index 6c783919..06418ef3 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. */ public final class std_expected_MR_CSharp_ExposedLayout_float { private std_expected_MR_CSharp_ExposedLayout_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java index 6999846a..11d4688d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. */ public final class std_expected_MR_CSharp_NonTrivial_float { private std_expected_MR_CSharp_NonTrivial_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java index 4e81dd0c..81e49b6b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. */ public final class std_expected_MR_CSharp_SA_float { private std_expected_MR_CSharp_SA_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java index 1bf16ecc..89e02838 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. */ public final class std_expected_MR_CSharp_Trivial_float { private std_expected_MR_CSharp_Trivial_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java index 92511daf..a7ce53bb 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_int_float`. */ public final class std_expected_int_float { private std_expected_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java index c090621f..5bc432a6 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_int_std_string`. */ public final class std_expected_int_std_string { private std_expected_int_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java b/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java index 14680621..5956bf88 100644 --- a/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_expected_void_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_void_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_void_float`. */ public final class std_expected_void_float { private std_expected_void_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java index 8c29e384..eeb4a594 100644 --- a/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java +++ b/test/output_java/src/mrbind_test/ffi/std_filesystem_path.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_filesystem_path`. */ public final class std_filesystem_path { private std_filesystem_path() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index bba6c24a..906da660 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. */ public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 { private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index 0ff77b94..8bed5155 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. */ public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC { private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java index e64172e5..9d3583fc 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. */ public final class std_function_MR_StdFunction_A { private std_function_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java index c1e4eb48..f82513c0 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. */ public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E { private std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int.java b/test/output_java/src/mrbind_test/ffi/std_function_int.java index 79b0745d..b99a0602 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int`. */ public final class std_function_int { private std_function_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java index 1e6eb1a5..eb7038ed 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_from_int_int`. */ public final class std_function_int_from_int_int { private std_function_int_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java b/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java index 607bff92..3b3a2717 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_from_std_string`. */ public final class std_function_int_from_std_string { private std_function_int_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java index d62144de..3a4a10d6 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. */ public final class std_function_int_ref_from_int_ref_int_rvalue_ref { private std_function_int_ref_from_int_ref_int_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java index cc8574a7..92602f42 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. */ public final class std_function_int_rvalue_ref { private std_function_int_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java index 4a5fc957..b0f239d1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. */ public final class std_function_std_string_from_int_float { private std_function_std_string_from_int_float() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java index a2a98cdc..d3299453 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_std_string_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. */ public final class std_function_std_string_from_int_int { private std_function_std_string_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void.java b/test/output_java/src/mrbind_test/ffi/std_function_void.java index ebfa3a4f..b2be91d1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_void.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void`. */ public final class std_function_void { private std_function_void() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java index 2e84d3df..31e86a6c 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. */ public final class std_function_void_from_MR_StdFunction_A { private std_function_void_from_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java index b3b475de..13fc74fa 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_int_int`. */ public final class std_function_void_from_int_int { private std_function_void_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java index f461d793..3b6161ae 100644 --- a/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. */ public final class std_function_void_from_std_string { private std_function_void_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java index 68c6eaea..6f238a58 100644 --- a/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. */ public final class std_list_MR_StdContainers_NonAssignable { private std_list_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_list_int.java b/test/output_java/src/mrbind_test/ffi/std_list_int.java index 78865bfd..80aeb0e6 100644 --- a/test/output_java/src/mrbind_test/ffi/std_list_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_list_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_int`. */ public final class std_list_int { private std_list_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java index 5621fc6f..b2b9a292 100644 --- a/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. */ public final class std_map_MR_StdContainers_NonAssignable_float { private std_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_map_int_float.java b/test/output_java/src/mrbind_test/ffi/std_map_int_float.java index 1654ccdc..87b9eb08 100644 --- a/test/output_java/src/mrbind_test/ffi/std_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_int_float`. */ public final class std_map_int_float { private std_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java index 722ad6f8..56ecec09 100644 --- a/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_multimap_MR_StdContainers_NonAssignable_float { private std_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java index 355b2582..51c5e679 100644 --- a/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_int_float`. */ public final class std_multimap_int_float { private std_multimap_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java index 1a02113a..314caf03 100644 --- a/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. */ public final class std_multiset_MR_StdContainers_NonAssignable { private std_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java/src/mrbind_test/ffi/std_multiset_float.java index 386a415d..4fa3463f 100644 --- a/test/output_java/src/mrbind_test/ffi/std_multiset_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_float`. */ public final class std_multiset_float { private std_multiset_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_multiset_int.java b/test/output_java/src/mrbind_test/ffi/std_multiset_int.java index 5e0f7360..f48b4e3a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_multiset_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_int`. */ public final class std_multiset_int { private std_multiset_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java index 2e391f50..b6ac1fd1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. */ public final class std_optional_MR_CSharp_ExposedLayoutSh { private std_optional_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java index 10bee38b..15cae432 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. */ public final class std_optional_MR_CSharp_NonTrivial { private std_optional_MR_CSharp_NonTrivial() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java index 13ff2ba8..3282e9d2 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. */ public final class std_optional_MR_CSharp_SA { private std_optional_MR_CSharp_SA() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java index cde44112..a4186168 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. */ public final class std_optional_MR_CSharp_Trivial { private std_optional_MR_CSharp_Trivial() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java index 41f59d25..2c7ec0ae 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. */ public final class std_optional_MR_StdOptional_A { private std_optional_MR_StdOptional_A() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java index f091760c..ee11b710 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. */ public final class std_optional_MR_StdOptional_B { private std_optional_MR_StdOptional_B() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java index 26c2b8ea..b339627b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. */ public final class std_optional_MR_StdOptional_E { private std_optional_MR_StdOptional_E() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_int.java b/test/output_java/src/mrbind_test/ffi/std_optional_int.java index f64b40a1..d70ac82e 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_int`. */ public final class std_optional_int { private std_optional_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java index 7420f29f..5ea915b4 100644 --- a/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_optional_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_std_string`. */ public final class std_optional_std_string { private std_optional_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java index 99ce3870..d0701981 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_pair_MR_SeparateA_MR_SeparateB { private std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java index 88f72999..9a6495e0 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. */ public final class std_pair_const_MR_StdContainers_NonAssignable_float { private std_pair_const_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java index 34eea1e7..5656eb09 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_float`. */ public final class std_pair_const_int_float { private std_pair_const_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java index 0db03228..00c7ce70 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. */ public final class std_pair_const_int_ref_const_float_ref { private std_pair_const_int_ref_const_float_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java index c5c1d6eb..08547589 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. */ public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref { private std_pair_const_int_rvalue_ref_const_float_rvalue_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java index baf401b2..1a1ad1c2 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_float`. */ public final class std_pair_int_float { private std_pair_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java index b31e0d02..38392a76 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. */ public final class std_pair_int_ref_float_ref { private std_pair_int_ref_float_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java index ad8b8edf..677b84ae 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. */ public final class std_pair_int_rvalue_ref_float_rvalue_ref { private std_pair_int_rvalue_ref_float_rvalue_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java index 5c6bdcdf..b1da301a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_pair_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_std_string`. */ public final class std_pair_int_std_string { private std_pair_int_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java index 57a1ce96..1263684d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. */ public final class std_set_MR_StdContainers_NonAssignable { private std_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_float.java b/test/output_java/src/mrbind_test/ffi/std_set_float.java index 47712d97..95c94dc8 100644 --- a/test/output_java/src/mrbind_test/ffi/std_set_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_set_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_float`. */ public final class std_set_float { private std_set_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_set_int.java b/test/output_java/src/mrbind_test/ffi/std_set_int.java index d43ec702..3145d379 100644 --- a/test/output_java/src/mrbind_test/ffi/std_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_int`. */ public final class std_set_int { private std_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java index aae58f97..dbc896b8 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. */ public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh { private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java index c17dc3ec..cccfe2cb 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. */ public final class std_shared_ptr_MR_CSharp_SA { private std_shared_ptr_MR_CSharp_SA() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java index 5dcf8ce6..274d1a0d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. */ public final class std_shared_ptr_MR_CSharp_SE { private std_shared_ptr_MR_CSharp_SE() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java index 00f8de85..79cc6ffd 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. */ public final class std_shared_ptr_MR_CSharp_SG { private std_shared_ptr_MR_CSharp_SG() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java index a1b6747e..19805dd4 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. */ public final class std_shared_ptr_MR_CommonBaseAB { private std_shared_ptr_MR_CommonBaseAB() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java index d476159b..cb1ba328 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_MR_StdSharedPtr_A { private std_shared_ptr_MR_StdSharedPtr_A() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java index 8ddc8375..bc74688d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array { private std_shared_ptr_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java index 33a54a0a..8af41b39 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java index cf59e707..98d5526b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. */ public final class std_shared_ptr_const_MR_CSharp_SA { private std_shared_ptr_const_MR_CSharp_SA() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java index 3709e4fe..20832f16 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A { private std_shared_ptr_const_MR_StdSharedPtr_A() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java index 7fdac6d8..ff6f8f39 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array { private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java index 6326b139..1a9103ba 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java index 5bcd37f5..1c03b1a4 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. */ public final class std_shared_ptr_const_int { private std_shared_ptr_const_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java index 64626f17..dd077da1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. */ public final class std_shared_ptr_const_int_array { private std_shared_ptr_const_int_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java index b9725acd..7b0b77d8 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. */ public final class std_shared_ptr_const_int_array_42 { private std_shared_ptr_const_int_array_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java index 7aa5bde9..fc26ab1a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. */ public final class std_shared_ptr_const_void { private std_shared_ptr_const_void() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java index 49f4c1f5..14953c19 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int`. */ public final class std_shared_ptr_int { private std_shared_ptr_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java index 826444ba..a9f0271f 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. */ public final class std_shared_ptr_int_array { private std_shared_ptr_int_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java index 1591a556..2887abfd 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. */ public final class std_shared_ptr_int_array_42 { private std_shared_ptr_int_array_42() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java index e4de6a56..aa5ddfb3 100644 --- a/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java +++ b/test/output_java/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_void`. */ public final class std_shared_ptr_void { private std_shared_ptr_void() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_string.java b/test/output_java/src/mrbind_test/ffi/std_string.java index 4e0bdf26..be5b9c6e 100644 --- a/test/output_java/src/mrbind_test/ffi/std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string`. */ public final class std_string { private std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_string_view.java b/test/output_java/src/mrbind_test/ffi/std_string_view.java index 00e81830..77b66045 100644 --- a/test/output_java/src/mrbind_test/ffi/std_string_view.java +++ b/test/output_java/src/mrbind_test/ffi/std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string_view`. */ public final class std_string_view { private std_string_view() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple.java b/test/output_java/src/mrbind_test/ffi/std_tuple.java index 8cbe446e..336ea3bf 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple`. */ public final class std_tuple { private std_tuple() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java index 8133ed79..c0356ab6 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. */ public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout { private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java index b4af3042..97fb581a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref { private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java index 4014137c..4764212a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref { private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java index c9d6cd51..743c7ec5 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. */ public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd { private std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java index 2570ee74..5e31e992 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. */ public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref { private std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java index c6fd9ca9..a371e80d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_const_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. */ public final class std_tuple_const_int_std_string { private std_tuple_const_int_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java b/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java index 101e096b..850b5d53 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_float_double_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. */ public final class std_tuple_float_double_int_int { private std_tuple_float_double_int_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int.java index cf2a96b2..378ae9f1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int`. */ public final class std_tuple_int { private std_tuple_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java index ff640e11..6be24221 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_float`. */ public final class std_tuple_int_float { private std_tuple_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java index cfe25e86..90a276f0 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. */ public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref { private std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java index 230f58d7..18c7fb3e 100644 --- a/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_tuple_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_std_string`. */ public final class std_tuple_int_std_string { private std_tuple_int_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java index 5b7a55ab..78817e69 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. */ public final class std_unique_ptr_MR_StdUniquePtr_A { private std_unique_ptr_MR_StdUniquePtr_A() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java index 86f55711..49d7c0d2 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. */ public final class std_unique_ptr_MR_StdUniquePtr_A_array { private std_unique_ptr_MR_StdUniquePtr_A_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java index 8faaa5e3..627943b1 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int`. */ public final class std_unique_ptr_int { private std_unique_ptr_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java index 923576b1..4792ec2b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java +++ b/test/output_java/src/mrbind_test/ffi/std_unique_ptr_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. */ public final class std_unique_ptr_int_array { private std_unique_ptr_int_array() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java index 4b9cd7ac..c66b1bdd 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_map_MR_StdContainers_NonAssignable_float { private std_unordered_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java index 489ca3d2..5197e968 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_int_float`. */ public final class std_unordered_map_int_float { private std_unordered_map_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java index 805d3ea0..1f41462b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float { private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java index 6a18e1d0..f538edbc 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. */ public final class std_unordered_multimap_int_float { private std_unordered_multimap_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java index c33c45fd..5aed4634 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. */ public final class std_unordered_multiset_MR_StdContainers_NonAssignable { private std_unordered_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java index cdd37291..f03eb910 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_int`. */ public final class std_unordered_multiset_int { private std_unordered_multiset_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java index b6f73a1c..05948578 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. */ public final class std_unordered_set_MR_StdContainers_NonAssignable { private std_unordered_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java b/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java index e6f1889c..cc6f5b1f 100644 --- a/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_unordered_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_int`. */ public final class std_unordered_set_int { private std_unordered_set_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java index aa5dac23..db2104c9 100644 --- a/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float`. */ public final class std_variant_int_float { private std_variant_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java index b81afbd9..2f233c54 100644 --- a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float_float`. */ public final class std_variant_int_float_float { private std_variant_int_float_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java index 9c223896..efd501e3 100644 --- a/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_variant_int_float_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. */ public final class std_variant_int_float_std_string { private std_variant_int_float_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java index 172250fe..29ef947c 100644 --- a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. */ public final class std_variant_std_monostate_int_float { private std_variant_std_monostate_int_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java index c34cf2ca..1e87dd24 100644 --- a/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java +++ b/test/output_java/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. */ public final class std_variant_std_monostate_int_float_float { private std_variant_std_monostate_int_float_float() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java index a4e51525..79f6018a 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_A`. */ public final class std_vector_MR_A { private std_vector_MR_A() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java index f79d0158..eb25b044 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. */ public final class std_vector_MR_CSharp_A_ptr { private std_vector_MR_CSharp_A_ptr() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java index 7bd0bb53..cd63cb4b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. */ public final class std_vector_MR_CSharp_ExposedLayout { private std_vector_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java index 8c974d0a..633916a4 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_SeparateA`. */ public final class std_vector_MR_SeparateA { private std_vector_MR_SeparateA() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java index 0fd0a933..14fdd716 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_SeparateB`. */ public final class std_vector_MR_SeparateB { private std_vector_MR_SeparateB() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java index d347fddd..704835c9 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. */ public final class std_vector_MR_StdContainers_NonAssignable { private std_vector_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java index 529230bb..94d8fa56 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. */ public final class std_vector_MR_StdContainers_NonDefaultConstructible { private std_vector_MR_StdContainers_NonDefaultConstructible() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java index f8a752ed..70b1b304 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. */ public final class std_vector_const_MR_CSharp_A_ptr { private std_vector_const_MR_CSharp_A_ptr() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_int.java b/test/output_java/src/mrbind_test/ffi/std_vector_int.java index 71acac26..5c8bef1d 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_int.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_int`. */ public final class std_vector_int { private std_vector_int() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_long.java b/test/output_java/src/mrbind_test/ffi/std_vector_long.java index 321a8eb1..a595b32f 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_long.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_long.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_long`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_long`. */ public final class std_vector_long { private std_vector_long() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java b/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java index 6d671f05..f3ba497b 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. */ public final class std_vector_std_expected_int_std_string { private std_vector_std_expected_int_std_string() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java index 6cf68579..87b0dd90 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB { private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java b/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java index 7008ae34..27f4ce7e 100644 --- a/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java +++ b/test/output_java/src/mrbind_test/ffi/std_vector_unsigned_long.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_unsigned_long`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_unsigned_long`. */ public final class std_vector_unsigned_long { private std_vector_unsigned_long() {} diff --git a/test/output_java/src/mrbind_test/mr/A.java b/test/output_java/src/mrbind_test/mr/A.java index b29c79c7..c525dc14 100644 --- a/test/output_java/src/mrbind_test/mr/A.java +++ b/test/output_java/src/mrbind_test/mr/A.java @@ -114,6 +114,7 @@ public mrbind_test.mr.cs.std_string x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -139,6 +140,7 @@ public void setX(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/Functions.java b/test/output_java/src/mrbind_test/mr/Functions.java index c4017018..28ed7490 100644 --- a/test/output_java/src/mrbind_test/mr/Functions.java +++ b/test/output_java/src/mrbind_test/mr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/SeparateA.java b/test/output_java/src/mrbind_test/mr/SeparateA.java index a642c4fb..6d96c068 100644 --- a/test/output_java/src/mrbind_test/mr/SeparateA.java +++ b/test/output_java/src/mrbind_test/mr/SeparateA.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/SeparateB.java b/test/output_java/src/mrbind_test/mr/SeparateB.java index 860759b4..0540f87b 100644 --- a/test/output_java/src/mrbind_test/mr/SeparateB.java +++ b/test/output_java/src/mrbind_test/mr/SeparateB.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java/src/mrbind_test/mr/abstractclasses/C.java index 543459df..536ba196 100644 --- a/test/output_java/src/mrbind_test/mr/abstractclasses/C.java +++ b/test/output_java/src/mrbind_test/mr/abstractclasses/C.java @@ -47,4 +47,64 @@ public void foo() java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::AbstractClasses::B`. The result refers to this object. + * + * Calls `MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B()`. */ + public mrbind_test.mr.abstractclasses.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B.invokeExact(rawPointer()); + return new mrbind_test.mr.abstractclasses.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::AbstractClasses::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C staticDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::AbstractClasses::B`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C dynamicDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java/src/mrbind_test/mr/adjustingnames/A.java index f042d84c..a610850a 100644 --- a/test/output_java/src/mrbind_test/mr/adjustingnames/A.java +++ b/test/output_java/src/mrbind_test/mr/adjustingnames/A.java @@ -181,6 +181,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_unsigned_long.invokeExact(); + mrbind_test.Ffi.checkException(); return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); } catch (java.lang.Throwable __e) @@ -200,6 +201,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_unsigned_long.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java index c7883663..4d664bcf 100644 --- a/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java +++ b/test/output_java/src/mrbind_test/mr/adjustingnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.adjustingnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/aggregates/A.java b/test/output_java/src/mrbind_test/mr/aggregates/A.java index 5c6327db..4dd5db2a 100644 --- a/test/output_java/src/mrbind_test/mr/aggregates/A.java +++ b/test/output_java/src/mrbind_test/mr/aggregates/A.java @@ -141,6 +141,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -163,6 +164,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -185,6 +187,7 @@ public mrbind_test.mr.cs.std_string y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -210,6 +213,7 @@ public void setY(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/aggregates/C.java b/test/output_java/src/mrbind_test/mr/aggregates/C.java index aed30f20..5698c344 100644 --- a/test/output_java/src/mrbind_test/mr/aggregates/C.java +++ b/test/output_java/src/mrbind_test/mr/aggregates/C.java @@ -138,6 +138,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -160,6 +161,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -182,6 +184,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +207,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +230,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -248,6 +253,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -270,6 +276,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -292,6 +299,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -314,6 +322,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -336,6 +345,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -358,6 +368,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -380,6 +391,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -402,6 +414,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -424,6 +437,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +460,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -468,6 +483,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/aggregates/D.java b/test/output_java/src/mrbind_test/mr/aggregates/D.java index 3aafeba2..0934c0a2 100644 --- a/test/output_java/src/mrbind_test/mr/aggregates/D.java +++ b/test/output_java/src/mrbind_test/mr/aggregates/D.java @@ -137,6 +137,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -159,6 +160,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -181,6 +183,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -203,6 +206,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +229,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -247,6 +252,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -269,6 +275,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -291,6 +298,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +321,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -335,6 +344,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -357,6 +367,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -379,6 +390,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -401,6 +413,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -423,6 +436,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -445,6 +459,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -467,6 +482,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -489,6 +505,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -511,6 +528,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/aggregates/E.java b/test/output_java/src/mrbind_test/mr/aggregates/E.java index ef7cdd4a..9dc267ed 100644 --- a/test/output_java/src/mrbind_test/mr/aggregates/E.java +++ b/test/output_java/src/mrbind_test/mr/aggregates/E.java @@ -119,6 +119,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -142,6 +143,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -165,6 +167,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -188,6 +191,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -211,6 +215,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -234,6 +239,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -257,6 +263,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -280,6 +287,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -303,6 +311,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -326,6 +335,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -349,6 +359,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -372,6 +383,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -395,6 +407,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -418,6 +431,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -441,6 +455,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -464,6 +479,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -487,6 +503,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -510,6 +527,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -533,6 +551,7 @@ public mrbind_test.mr.aggregates.NonDefaultConstructible j() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); } @@ -558,6 +577,7 @@ public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/bases/B.java b/test/output_java/src/mrbind_test/mr/bases/B.java index 059c527a..d46a312d 100644 --- a/test/output_java/src/mrbind_test/mr/bases/B.java +++ b/test/output_java/src/mrbind_test/mr/bases/B.java @@ -110,4 +110,44 @@ public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/B2.java b/test/output_java/src/mrbind_test/mr/bases/B2.java index fe608fea..04210068 100644 --- a/test/output_java/src/mrbind_test/mr/bases/B2.java +++ b/test/output_java/src/mrbind_test/mr/bases/B2.java @@ -106,4 +106,84 @@ public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::Bases::B`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_B()`. */ + public mrbind_test.mr.bases.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_B.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::B`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromB(mrbind_test.mr.bases.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/C.java b/test/output_java/src/mrbind_test/mr/bases/C.java index 69464400..a8d4ec07 100644 --- a/test/output_java/src/mrbind_test/mr/bases/C.java +++ b/test/output_java/src/mrbind_test/mr/bases/C.java @@ -107,4 +107,44 @@ public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_C_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.C staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/F.java b/test/output_java/src/mrbind_test/mr/bases/F.java index 5a36fb67..81ce9f6f 100644 --- a/test/output_java/src/mrbind_test/mr/bases/F.java +++ b/test/output_java/src/mrbind_test/mr/bases/F.java @@ -109,4 +109,44 @@ public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_F_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E()`. */ + public static mrbind_test.mr.bases.F staticDowncastFromE(mrbind_test.mr.bases.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/G.java b/test/output_java/src/mrbind_test/mr/bases/G.java index 3155697f..a0cbdaf8 100644 --- a/test/output_java/src/mrbind_test/mr/bases/G.java +++ b/test/output_java/src/mrbind_test/mr/bases/G.java @@ -106,4 +106,44 @@ public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/H.java b/test/output_java/src/mrbind_test/mr/bases/H.java index 06f6cf1f..135e73e7 100644 --- a/test/output_java/src/mrbind_test/mr/bases/H.java +++ b/test/output_java/src/mrbind_test/mr/bases/H.java @@ -108,4 +108,84 @@ public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.H staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/bases/I.java b/test/output_java/src/mrbind_test/mr/bases/I.java index 15ceaabf..c6211ec0 100644 --- a/test/output_java/src/mrbind_test/mr/bases/I.java +++ b/test/output_java/src/mrbind_test/mr/bases/I.java @@ -107,4 +107,64 @@ public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java index 1de169f3..7878f307 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -216,6 +216,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -234,6 +235,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -252,6 +254,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -274,6 +277,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java index 2453dd45..4ea2c288 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -206,6 +206,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -224,6 +225,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,6 +244,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -264,6 +267,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java index 5ce956a4..06120dd8 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -105,4 +105,84 @@ public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java index 6d755f8f..be5c2553 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -182,6 +182,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -200,6 +201,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -218,6 +220,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -240,6 +243,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -250,4 +254,44 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `D`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.D staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java index ec4cfd93..79b2d076 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -107,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java index 2f3915a4..e5d2d3e6 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -107,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java index 706d00c5..824300f1 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -184,6 +184,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -202,6 +203,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +222,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -242,6 +245,27 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java index 00c5a3c5..ea4b3ce8 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -180,6 +180,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -198,6 +199,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +218,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -238,6 +241,47 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -248,4 +292,24 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.H staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java index de5b7a6d..0b575e39 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -180,6 +180,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -198,6 +199,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +218,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -238,6 +241,47 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -248,4 +292,24 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `I`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.I staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java index 69106d9e..93b7c3d2 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -186,6 +186,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +205,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -222,6 +224,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -244,6 +247,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -254,4 +258,44 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `J`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.J staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java index 096eda55..574eee03 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -186,6 +186,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +205,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -222,6 +224,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -244,6 +247,47 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java index 35988493..07aa1002 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -185,6 +185,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -203,6 +204,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -221,6 +223,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -243,6 +246,27 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -253,4 +277,64 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `N`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.N staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java index 0ef9cad8..5fb9ca1d 100644 --- a/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java +++ b/test/output_java/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -184,6 +184,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -202,6 +203,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +222,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -242,6 +245,107 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::N`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N()`. */ + public mrbind_test.mr.copyinheritedmembers.N upcastToN() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -252,4 +356,24 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Static downcast from the base class `MR::CopyInheritedMembers::N`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromN(mrbind_test.mr.copyinheritedmembers.N object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/Functions.java b/test/output_java/src/mrbind_test/mr/cs/Functions.java index 6a8dc101..370c7484 100644 --- a/test/output_java/src/mrbind_test/mr/cs/Functions.java +++ b/test/output_java/src/mrbind_test/mr/cs/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.cs; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index f4f90006..e484ab62 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -167,4 +167,65 @@ public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_E1_from_MR_CSharp_E1.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.E1 __ret = func.call(mrbind_test.mr.csharp.E1.of(_1)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index ca23b592..570af0ba 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -168,4 +168,65 @@ public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLa java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.class, "__call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.ExposedLayoutC __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutC(_1.reinterpret(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT.byteSize()), null)); + return mrbind_test.Ffi.ptrNonNull(__ret, "the callback result"); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java index b04dd906..d5dd21bc 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -167,4 +167,66 @@ public mrbind_test.mr.stdfunction.A call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.A call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.A __ret = func.call(); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java index 5065cb9f..df121736 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -167,4 +167,65 @@ public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2 java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.E __ret = func.call(_1, mrbind_test.mr.stdfunction.E.of(_2)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int.java index 9f110e17..6d539445 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_int.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int.java @@ -167,4 +167,65 @@ public int call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java index cca0e0f5..a17f9f98 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_int_int.java @@ -167,4 +167,65 @@ public int call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java index f1d11eaa..02a31d42 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_from_std_string.java @@ -168,4 +168,65 @@ public int call(java.lang.String _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java index 63912be8..39a43f38 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -167,4 +167,65 @@ public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_ref_from_int_ref_int_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java b/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java index 839baa0c..1f2b58d7 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -167,4 +167,65 @@ public java.lang.foreign.MemorySegment call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java index c06bb6d1..35113571 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java @@ -167,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, float _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, float _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int_float.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, float _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int_float_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int_float of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int_float_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java index a4a2dfc3..55c1d17d 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java @@ -167,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void.java index 02992f6e..8c6de0c3 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_void.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void.java @@ -166,4 +166,63 @@ public void call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java index 6a984cf4..0071ea5b 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -167,4 +167,63 @@ public void call(mrbind_test.mr.stdfunction.A _1) java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.stdfunction.A _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.stdfunction.A(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java index 5173f357..14e198eb 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_int_int.java @@ -166,4 +166,63 @@ public void call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1, _2); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java index 0f4725f5..521708af 100644 --- a/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java +++ b/test/output_java/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -167,4 +167,63 @@ public void call(java.lang.String _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java index 99d38d46..21aaece3 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -88,6 +88,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -110,6 +111,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +134,7 @@ public int ia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +157,7 @@ public static long iaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +177,7 @@ public java.lang.foreign.MemorySegment iaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +200,7 @@ public static long iaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -214,6 +220,7 @@ public int ci() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -237,6 +244,7 @@ public int cia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -259,6 +267,7 @@ public static long ciaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -278,6 +287,7 @@ public java.lang.foreign.MemorySegment ciaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -300,6 +310,7 @@ public static long ciaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -319,6 +330,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -344,6 +356,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -366,6 +379,7 @@ public mrbind_test.mr.cs.std_string sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -389,6 +403,7 @@ public static long saSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -409,6 +424,7 @@ public mrbind_test.mr.cs.std_string cs() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -433,6 +449,7 @@ public mrbind_test.mr.cs.std_string csa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -456,6 +473,7 @@ public static long csaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/B.java b/test/output_java/src/mrbind_test/mr/csharp/B.java index 379d564a..25e59795 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/B.java +++ b/test/output_java/src/mrbind_test/mr/csharp/B.java @@ -275,4 +275,64 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_B_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/C.java b/test/output_java/src/mrbind_test/mr/csharp/C.java index 53d0e96d..73cf5bd8 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/C.java +++ b/test/output_java/src/mrbind_test/mr/csharp/C.java @@ -136,7 +136,7 @@ public void bar(int _1, int _2) { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -158,7 +158,7 @@ public static void static_foo() { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_foo.invokeExact(); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_static_foo.invokeExact(); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -176,7 +176,7 @@ public static void static_bar(int _1, int _2) { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_bar.invokeExact(_1, _2); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_static_bar.invokeExact(_1, _2); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -251,4 +251,44 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_C_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.C dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java index 2c143061..d64099a9 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -90,6 +90,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -126,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -145,6 +148,7 @@ public static void setSb(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -162,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -180,6 +185,7 @@ public static boolean sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) @@ -199,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -244,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +276,7 @@ public void setB(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -289,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -312,6 +323,7 @@ public boolean d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java index 3ddd0e89..12a9c63c 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -98,6 +98,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -117,6 +118,7 @@ public static void setSa(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -138,6 +140,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +160,7 @@ public static void setSb(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +182,7 @@ public static mrbind_test.mr.csharp.A sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -197,6 +202,7 @@ public static mrbind_test.mr.csharp.A sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -217,6 +223,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -240,6 +247,7 @@ public void setA(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -263,6 +271,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -286,6 +295,7 @@ public void setB(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -309,6 +319,7 @@ public mrbind_test.mr.csharp.A c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -333,6 +344,7 @@ public mrbind_test.mr.csharp.A d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java index 12f9d215..c497434f 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -97,6 +97,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -116,6 +117,7 @@ public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -137,6 +139,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +159,7 @@ public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -177,6 +181,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -196,6 +201,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -216,6 +222,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +246,7 @@ public void setA(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -262,6 +270,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -285,6 +294,7 @@ public void setB(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -308,6 +318,7 @@ public mrbind_test.mr.csharp.ExposedLayout c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -332,6 +343,7 @@ public mrbind_test.mr.csharp.ExposedLayout d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java index 89f39a77..191b5b42 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -90,6 +90,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -126,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -145,6 +148,7 @@ public static void setSb(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -162,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -180,6 +185,7 @@ public static short sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -199,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -244,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +276,7 @@ public void setB(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -289,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -312,6 +323,7 @@ public short d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java index 5554c8d3..3db7d12c 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -66,7 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } diff --git a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java index d9379578..90e54ffc 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java +++ b/test/output_java/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -58,7 +58,7 @@ public void foo() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -80,7 +80,7 @@ public void bar() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -102,7 +102,7 @@ public static void blah() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -121,7 +121,7 @@ public void opIncr() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/F.java b/test/output_java/src/mrbind_test/mr/csharp/F.java index 55fe7f3b..fcad7b57 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/F.java +++ b/test/output_java/src/mrbind_test/mr/csharp/F.java @@ -341,4 +341,144 @@ public void e2() java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromE(mrbind_test.mr.csharp.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/Functions.java b/test/output_java/src/mrbind_test/mr/csharp/Functions.java index 9f1b5361..f70b61b9 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/Functions.java +++ b/test/output_java/src/mrbind_test/mr/csharp/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.csharp; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -54,6 +54,7 @@ public static boolean test_bool(boolean a, java.lang.Boolean b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/G.java b/test/output_java/src/mrbind_test/mr/csharp/G.java index 2d596654..5883f28f 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/G.java +++ b/test/output_java/src/mrbind_test/mr/csharp/G.java @@ -343,4 +343,124 @@ public void e2() java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java index 4e487187..ccc9dfd1 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -65,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java index b87091a4..9fac5969 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -64,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java index 83fe7c92..d345a99d 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerA.java @@ -161,6 +161,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -183,6 +184,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java index 82f11fea..4961db4e 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IndexerB.java @@ -214,6 +214,7 @@ public mrbind_test.mr.csharp.IndexerA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -238,6 +239,7 @@ public void setA(mrbind_test.mr.csharp.IndexerA value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java/src/mrbind_test/mr/csharp/IterableA.java index 2907b39c..93c81c41 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableA.java @@ -162,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -184,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java index e5f807ff..022234c0 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableB.java @@ -162,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -184,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java index 1ffa51f6..0f621259 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableC.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableC.java @@ -210,6 +210,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -232,6 +233,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java index d580d07e..c0f3717f 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableD.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableD.java @@ -114,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -136,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java index 99a32be9..500f3a32 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableE.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableE.java @@ -114,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -136,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java index e43b1dd0..38e8a875 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableF.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableF.java @@ -114,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -136,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java index 2543b59c..bc4d61cb 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableG.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableG.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -163,7 +163,8 @@ public mrbind_test.mr.cs.std_string arr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -186,7 +187,8 @@ public static long arrSize() { try { - long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java index 066d6a95..4edc4153 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableH.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableH.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); mrbind_test.Ffi.checkException(); return __ret; } @@ -63,7 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); return __ret; } @@ -87,7 +87,7 @@ public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.I { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); @@ -114,7 +114,7 @@ public mrbind_test.mr.cs.std_string begin() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); @@ -139,7 +139,7 @@ public mrbind_test.mr.cs.std_string end() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_end.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); @@ -164,7 +164,8 @@ public mrbind_test.mr.cs.std_string arr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -187,7 +188,8 @@ public static long arrSize() { try { - long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java index b36ca26e..9e45a175 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableI.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableI.java @@ -38,7 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); mrbind_test.Ffi.checkException(); return __ret; } @@ -63,7 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); return __ret; } @@ -87,7 +87,7 @@ public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.I { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); @@ -113,7 +113,7 @@ public mrbind_test.mr.csharp.ExposedLayout begin() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); @@ -138,7 +138,7 @@ public mrbind_test.mr.csharp.ExposedLayout end() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_end.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); @@ -164,6 +164,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -187,6 +188,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java index 7fb5a94a..db53dbfb 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableJ.java @@ -165,6 +165,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -188,6 +189,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java index 35703036..a05fba68 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableK.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK.java @@ -163,6 +163,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -185,6 +186,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java index fe9000be..2c9f8308 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -207,6 +207,7 @@ public java.lang.foreign.MemorySegment ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -230,6 +231,7 @@ public void setPtr(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java index c1637e31..bc28814d 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -138,6 +138,7 @@ public java.lang.foreign.MemorySegment ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,6 +162,7 @@ public void setPtr(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java index 006a1b92..6c46cc80 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java +++ b/test/output_java/src/mrbind_test/mr/csharp/IterableL_int.java @@ -162,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -184,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java index e774723e..72d0d2b5 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesA.java @@ -186,6 +186,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -208,6 +209,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java index 6356fb5d..68ec1fb4 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesB.java @@ -218,6 +218,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -242,6 +243,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java index f4bb2eb0..cac6fc8d 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesC.java @@ -142,6 +142,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -166,6 +167,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java index 22530107..7ef26277 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesD.java @@ -208,7 +208,7 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); mrbind_test.Ffi.checkException(); - java.lang.Object __owner = this; + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -331,6 +331,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -355,6 +356,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java index f78d058d..d0e24f9a 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java +++ b/test/output_java/src/mrbind_test/mr/csharp/LifetimesE.java @@ -145,7 +145,7 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); mrbind_test.Ffi.checkException(); - java.lang.Object __owner = this; + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -194,6 +194,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -218,6 +219,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java index aa97100b..c770217a 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java +++ b/test/output_java/src/mrbind_test/mr/csharp/NameConflicts.java @@ -165,6 +165,7 @@ public int name_conflicts() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -187,6 +188,7 @@ public void setName_conflicts(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -209,6 +211,7 @@ public mrbind_test.mr.csharp.NameConflicts_A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); } @@ -233,6 +236,7 @@ public void setA(mrbind_test.mr.csharp.NameConflicts_A value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java index 86f8c7df..5386faed 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java +++ b/test/output_java/src/mrbind_test/mr/csharp/NonTrivial.java @@ -63,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +87,7 @@ public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java index 76d9d05c..e7f51184 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalE.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -112,7 +112,7 @@ public int opLess(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -136,7 +136,7 @@ public int opGreater(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -160,7 +160,7 @@ public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -184,7 +184,7 @@ public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } diff --git a/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java index 6f03c8fa..e956e60f 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java +++ b/test/output_java/src/mrbind_test/mr/csharp/RelationalF.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); mrbind_test.Ffi.checkException(); return __ret; } @@ -63,7 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); return __ret; } @@ -87,7 +87,7 @@ public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); @@ -112,7 +112,7 @@ public void opLess(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -135,7 +135,7 @@ public void opGreater(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -158,7 +158,7 @@ public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) @@ -181,7 +181,7 @@ public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/csharp/SA.java b/test/output_java/src/mrbind_test/mr/csharp/SA.java index 8372d9cf..49d64e51 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/SA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/SA.java @@ -18,7 +18,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -40,7 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_DefaultConstruct.invokeExact(); mrbind_test.Ffi.checkException(); return __ret; } @@ -65,7 +65,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,7 +89,8 @@ public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _othe { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SA(__ret, false, __owner); } diff --git a/test/output_java/src/mrbind_test/mr/csharp/SB.java b/test/output_java/src/mrbind_test/mr/csharp/SB.java index ff016380..cc394ebd 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/SB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/SB.java @@ -40,7 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_DefaultConstruct.invokeExact(); mrbind_test.Ffi.checkException(); return __ret; } @@ -143,6 +143,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -169,6 +170,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/SC.java b/test/output_java/src/mrbind_test/mr/csharp/SC.java index 2482e43b..aafa9ad3 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/SC.java +++ b/test/output_java/src/mrbind_test/mr/csharp/SC.java @@ -118,6 +118,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -144,6 +145,67 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CSharp::SA`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA()`. */ + public mrbind_test.mr.csharp.SA upcastToSA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SA(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SA`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSA(mrbind_test.mr.csharp.SA object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SB`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB()`. */ + public mrbind_test.mr.csharp.SB upcastToSB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SB(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -154,4 +216,24 @@ public void setS(java.lang.String value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Static downcast from the base class `MR::CSharp::SB`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSB(mrbind_test.mr.csharp.SB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/SE.java b/test/output_java/src/mrbind_test/mr/csharp/SE.java index 3f5958d1..a7236f82 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/SE.java +++ b/test/output_java/src/mrbind_test/mr/csharp/SE.java @@ -143,6 +143,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -169,6 +170,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/SF.java b/test/output_java/src/mrbind_test/mr/csharp/SF.java index 06efde16..71beca44 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/SF.java +++ b/test/output_java/src/mrbind_test/mr/csharp/SF.java @@ -118,6 +118,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -144,6 +145,87 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CSharp::SD`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD()`. */ + public mrbind_test.mr.csharp.SD upcastToSD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SD(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SD`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::SD`. Returns null if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF dynamicDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SE`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE()`. */ + public mrbind_test.mr.csharp.SE upcastToSE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SE(__ret, false, this); } catch (java.lang.Throwable __e) { @@ -154,4 +236,24 @@ public void setS(java.lang.String value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Static downcast from the base class `MR::CSharp::SE`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSE(mrbind_test.mr.csharp.SE object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java/src/mrbind_test/mr/csharp/TestFields.java index 66f18397..df020537 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/TestFields.java +++ b/test/output_java/src/mrbind_test/mr/csharp/TestFields.java @@ -99,6 +99,7 @@ public static int static_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -117,6 +118,7 @@ public static void setStatic_i(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +136,7 @@ public static int static_const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -152,6 +155,7 @@ public static java.lang.foreign.MemorySegment static_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -170,6 +174,7 @@ public static int static_const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -188,6 +193,7 @@ public static mrbind_test.mr.cs.std_string static_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -209,6 +215,7 @@ public static void setStatic_s(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +233,7 @@ public static mrbind_test.mr.cs.std_string static_const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -245,6 +253,7 @@ public static mrbind_test.mr.cs.std_string static_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -264,6 +273,7 @@ public static mrbind_test.mr.cs.std_string static_const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -285,6 +295,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -308,6 +319,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -330,6 +342,7 @@ public int const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -353,6 +366,7 @@ public java.lang.foreign.MemorySegment i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -376,6 +390,7 @@ public int const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -399,6 +414,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -424,6 +440,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +463,7 @@ public mrbind_test.mr.cs.std_string const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -470,6 +488,7 @@ public mrbind_test.mr.cs.std_string s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -494,6 +513,7 @@ public mrbind_test.mr.cs.std_string const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java index 9ed605f0..23d2ceca 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java +++ b/test/output_java/src/mrbind_test/mr/csharp/TestOpsA.java @@ -15,7 +15,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -584,7 +584,7 @@ public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -608,7 +608,7 @@ public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -632,7 +632,7 @@ public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -656,7 +656,7 @@ public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -680,7 +680,7 @@ public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -704,7 +704,7 @@ public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -728,7 +728,7 @@ public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -752,7 +752,7 @@ public int opOr(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -776,7 +776,7 @@ public int opComma(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -800,7 +800,7 @@ public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -824,7 +824,7 @@ public int arrow() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); return __ret; } @@ -847,7 +847,7 @@ public int call(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -871,7 +871,7 @@ public int index(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java index ce9824ed..60d60d6e 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java +++ b/test/output_java/src/mrbind_test/mr/csharp/TestOpsB.java @@ -38,7 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); return __ret; } @@ -62,7 +62,7 @@ public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); mrbind_test.Ffi.checkException(); return __ret; } @@ -86,7 +86,7 @@ public int opAdd() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); return __ret; } @@ -109,7 +109,7 @@ public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -133,7 +133,7 @@ public int opSub() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); return __ret; } @@ -156,7 +156,7 @@ public int opSub(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -180,7 +180,7 @@ public int opMul() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); return __ret; } @@ -203,7 +203,7 @@ public int opMul(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -227,7 +227,7 @@ public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -251,7 +251,7 @@ public int opMod(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -275,7 +275,7 @@ public int opXor(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } @@ -299,7 +299,7 @@ public int opBitand() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); mrbind_test.Ffi.checkException(); return __ret; } @@ -322,7 +322,7 @@ public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); mrbind_test.Ffi.checkException(); return __ret; } diff --git a/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java index 6849c3e2..d2fc362c 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java +++ b/test/output_java/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -177,6 +177,7 @@ public mrbind_test.mr.cs.std_function_int_from_std_string f1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, false, __owner); } @@ -201,6 +202,7 @@ public void setF1(mrbind_test.mr.cs.std_function_int_from_std_string value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -224,6 +226,7 @@ public mrbind_test.mr.cs.std_function_std_string_from_int_int f2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, false, __owner); } @@ -248,6 +251,7 @@ public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int_int value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -271,6 +275,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); } @@ -295,6 +300,7 @@ public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -318,6 +324,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_Ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); } @@ -342,6 +349,7 @@ public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_M try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -365,6 +373,7 @@ public mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, false, __owner); } @@ -389,6 +398,7 @@ public void setF5(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -412,6 +422,7 @@ public mrbind_test.mr.cs.std_function_int_rvalue_ref f6() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, false, __owner); } @@ -436,6 +447,7 @@ public void setF6(mrbind_test.mr.cs.std_function_int_rvalue_ref value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -459,6 +471,7 @@ public mrbind_test.mr.cs.std_function_void f7() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); } @@ -483,6 +496,7 @@ public void setF7(mrbind_test.mr.cs.std_function_void value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java/src/mrbind_test/mr/csharp/Trivial.java index 53c0e60f..ea9816a3 100644 --- a/test/output_java/src/mrbind_test/mr/csharp/Trivial.java +++ b/test/output_java/src/mrbind_test/mr/csharp/Trivial.java @@ -63,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +87,7 @@ public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Tri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } diff --git a/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java index c8e1d248..441125ac 100644 --- a/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java +++ b/test/output_java/src/mrbind_test/mr/customprefnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.customprefnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java/src/mrbind_test/mr/deprecation/Functions.java index 4f6276e5..c5841177 100644 --- a/test/output_java/src/mrbind_test/mr/deprecation/Functions.java +++ b/test/output_java/src/mrbind_test/mr/deprecation/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.deprecation; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java index 2bbc80ac..22998e45 100644 --- a/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java +++ b/test/output_java/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.includesforenumconstants; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java index 574aad7d..df7dfe44 100644 --- a/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java +++ b/test/output_java/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.incompletearrayelemtype; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/iostream/Functions.java b/test/output_java/src/mrbind_test/mr/iostream/Functions.java index c630cc46..c9f2e647 100644 --- a/test/output_java/src/mrbind_test/mr/iostream/Functions.java +++ b/test/output_java/src/mrbind_test/mr/iostream/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.iostream; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java index 22ad7503..8808e831 100644 --- a/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/A.java @@ -185,6 +185,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -207,6 +208,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java index 86b3d2d6..0af5d130 100644 --- a/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/B.java @@ -137,6 +137,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -159,6 +160,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java index 615b8395..5ec0fc2f 100644 --- a/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java +++ b/test/output_java/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.lifetimeinference; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java/src/mrbind_test/mr/matchinglayout/A.java index 35f546e3..21fdfc44 100644 --- a/test/output_java/src/mrbind_test/mr/matchinglayout/A.java +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/A.java @@ -65,6 +65,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -84,6 +85,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java index 87f7f26e..c23bb2ae 100644 --- a/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java +++ b/test/output_java/src/mrbind_test/mr/matchinglayout/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.matchinglayout; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/membervars/A.java b/test/output_java/src/mrbind_test/mr/membervars/A.java index cffa5dbf..8cf13345 100644 --- a/test/output_java/src/mrbind_test/mr/membervars/A.java +++ b/test/output_java/src/mrbind_test/mr/membervars/A.java @@ -62,6 +62,7 @@ public static int z() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -80,6 +81,7 @@ public static void setZ(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +99,7 @@ public static int w() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -116,6 +119,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -138,6 +142,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +165,7 @@ public int y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -184,6 +190,7 @@ public java.lang.foreign.MemorySegment ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -208,6 +215,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -230,6 +238,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java/src/mrbind_test/mr/nestedtypes/A.java index d1919edf..51db6dd5 100644 --- a/test/output_java/src/mrbind_test/mr/nestedtypes/A.java +++ b/test/output_java/src/mrbind_test/mr/nestedtypes/A.java @@ -143,6 +143,7 @@ public mrbind_test.mr.nestedtypes.A_B b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); } @@ -167,6 +168,7 @@ public void setB(mrbind_test.mr.nestedtypes.A_B value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -190,6 +192,7 @@ public mrbind_test.mr.nestedtypes.A_E e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -213,6 +216,7 @@ public void setE(mrbind_test.mr.nestedtypes.A_E value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java index cbc9b855..83f8e16d 100644 --- a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -65,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java index 8248e5c7..dcd5cf64 100644 --- a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -65,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java index 2602059a..d206956d 100644 --- a/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java +++ b/test/output_java/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.omittingtargsandquals; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java index a3eb40ed..4b146425 100644 --- a/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java +++ b/test/output_java/src/mrbind_test/mr/overloadedops/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloadedops; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/overloads/Functions.java b/test/output_java/src/mrbind_test/mr/overloads/Functions.java index 7d9045a5..bca7a875 100644 --- a/test/output_java/src/mrbind_test/mr/overloads/Functions.java +++ b/test/output_java/src/mrbind_test/mr/overloads/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloads; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/phmap/Functions.java b/test/output_java/src/mrbind_test/mr/phmap/Functions.java index 27781a01..140351a0 100644 --- a/test/output_java/src/mrbind_test/mr/phmap/Functions.java +++ b/test/output_java/src/mrbind_test/mr/phmap/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.phmap; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java index cf766b5f..14d92f69 100644 --- a/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/Blah.java @@ -113,6 +113,7 @@ public mrbind_test.mr.signaturefilters.A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -137,6 +138,7 @@ public void setA(mrbind_test.mr.signaturefilters.A value) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java index c870a007..35b84c99 100644 --- a/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java +++ b/test/output_java/src/mrbind_test/mr/signaturefilters/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.signaturefilters; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java/src/mrbind_test/mr/staticfuncs/A.java index fb1a04bd..dcb3a824 100644 --- a/test/output_java/src/mrbind_test/mr/staticfuncs/A.java +++ b/test/output_java/src/mrbind_test/mr/staticfuncs/A.java @@ -130,6 +130,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -148,6 +149,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java index 5af5977b..79818ac9 100644 --- a/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdcontainers/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdcontainers; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java index 4afdad89..eb465f1d 100644 --- a/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdexpected/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdexpected; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java index 42d154e8..b6f01f2a 100644 --- a/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfilesystem; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdfunction/A.java b/test/output_java/src/mrbind_test/mr/stdfunction/A.java index bbe00cf5..e4c0462f 100644 --- a/test/output_java/src/mrbind_test/mr/stdfunction/A.java +++ b/test/output_java/src/mrbind_test/mr/stdfunction/A.java @@ -139,6 +139,7 @@ public mrbind_test.mr.cs.std_string a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -164,6 +165,7 @@ public void setA(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java index 013bfc39..29a235ca 100644 --- a/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdfunction/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfunction; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/A.java b/test/output_java/src/mrbind_test/mr/stdoptional/A.java index 77e7887e..963d89f2 100644 --- a/test/output_java/src/mrbind_test/mr/stdoptional/A.java +++ b/test/output_java/src/mrbind_test/mr/stdoptional/A.java @@ -87,6 +87,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +111,7 @@ public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } @@ -135,6 +137,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +160,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/B.java b/test/output_java/src/mrbind_test/mr/stdoptional/B.java index e1782c33..9484afc6 100644 --- a/test/output_java/src/mrbind_test/mr/stdoptional/B.java +++ b/test/output_java/src/mrbind_test/mr/stdoptional/B.java @@ -89,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +113,7 @@ public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } @@ -137,6 +139,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -162,6 +165,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java index 9cb57d65..7d0332e7 100644 --- a/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdoptional/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdoptional; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java index 5ad9b302..c6fccd3b 100644 --- a/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdsharedptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java/src/mrbind_test/mr/stdstring/Functions.java index 0b13f2c0..f58ee771 100644 --- a/test/output_java/src/mrbind_test/mr/stdstring/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdstring/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstring; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java index 5c81e21c..771bdf30 100644 --- a/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdstringview/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstringview; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java index 6a342caa..5940ada2 100644 --- a/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdtuplelike; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java index 44dcaa7f..17db6080 100644 --- a/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stduniqueptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java index 0b97cba8..f77b9b6c 100644 --- a/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java +++ b/test/output_java/src/mrbind_test/mr/stdvariant/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdvariant; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/tags/Functions.java b/test/output_java/src/mrbind_test/mr/tags/Functions.java index 0ef68338..64da91ac 100644 --- a/test/output_java/src/mrbind_test/mr/tags/Functions.java +++ b/test/output_java/src/mrbind_test/mr/tags/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.tags; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java index c7f7c440..c723ed2a 100644 --- a/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/ClassTemplate_unsigned_long.java @@ -186,6 +186,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Get_var_unsigned_long.invokeExact(); + mrbind_test.Ffi.checkException(); return mrbind_test.Ffi.getCLong(__ret.reinterpret(8), 0); } catch (java.lang.Throwable __e) @@ -205,6 +206,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_unsigned_long_Set_var_unsigned_long.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java index c388fbfb..3ca2609f 100644 --- a/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java +++ b/test/output_java/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsimpletypes; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java/src/mrbind_test/mr/testsizet/Functions.java index 4975e507..8e432cde 100644 --- a/test/output_java/src/mrbind_test/mr/testsizet/Functions.java +++ b/test/output_java/src/mrbind_test/mr/testsizet/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsizet; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java index 05a81ad9..b41c489f 100644 --- a/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java +++ b/test/output_java/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.typedefsintemplates; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { diff --git a/test/output_java/src/mrbind_test/mr/usingdecls/A.java b/test/output_java/src/mrbind_test/mr/usingdecls/A.java index cf3ccce4..9130a7b2 100644 --- a/test/output_java/src/mrbind_test/mr/usingdecls/A.java +++ b/test/output_java/src/mrbind_test/mr/usingdecls/A.java @@ -201,6 +201,7 @@ public static int StaticVar() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -219,6 +220,7 @@ public static void setStaticVar(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +239,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -259,6 +262,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java/src/mrbind_test/mr/usingdecls/B.java b/test/output_java/src/mrbind_test/mr/usingdecls/B.java index 8ad8d8a7..345eeea1 100644 --- a/test/output_java/src/mrbind_test/mr/usingdecls/B.java +++ b/test/output_java/src/mrbind_test/mr/usingdecls/B.java @@ -177,6 +177,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -199,6 +200,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +222,7 @@ public static int StaticVar() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_StaticVar.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -238,10 +241,51 @@ public static void setStaticVar(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_StaticVar.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { throw mrbind_test.Ffi.rethrow(__e); } } + + /** Upcasts to the base class `MR::UsingDecls::A`. The result refers to this object. + * + * Calls `MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A()`. */ + public mrbind_test.mr.usingdecls.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A.invokeExact(rawPointer()); + return new mrbind_test.mr.usingdecls.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::UsingDecls::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A()`. */ + public static mrbind_test.mr.usingdecls.B staticDowncastFromA(mrbind_test.mr.usingdecls.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.usingdecls.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java index 5969c872..3f1347df 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppException.java @@ -1,6 +1,6 @@ package mrbind_test; -/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +/** A C++ exception thrown by the C bindings. */ public class CppException extends RuntimeException { private static final long serialVersionUID = 1; diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java index 2909e68e..a945b109 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppObject.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * The base class of the wrappers of the opaque C++ classes. * * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), * or is a reference to an object owned by something else. References returned by methods keep their owner alive. diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java b/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java index 16a3e7c1..b7485a86 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/CppStruct.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. * * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), * those returned by reference from the bindings point into memory owned by something else, which they keep alive. diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java index c4d2bfe5..2ffc02b1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Ffi.java @@ -1,6 +1,6 @@ package mrbind_test; -/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +/** The runtime support of the bindings. */ @SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. public final class Ffi { @@ -277,4 +277,85 @@ public static RuntimeException rethrow(Throwable e) throw err; return new RuntimeException(e); } + + // What the wrapper must throw once the C call returns: a C++ exception message reported by the C bindings (a String), + // or an exception thrown by a Java callback (a Throwable). Per thread, since the C bindings report per thread. + private static final ThreadLocal PENDING = new ThreadLocal<>(); + + /** Throws if the last call into the C bindings threw a C++ exception, or a Java callback threw. */ + public static void checkException() + { + Object pending = PENDING.get(); + if (pending == null) + return; + PENDING.remove(); + if (pending instanceof Throwable error) + throw rethrow(error); + throw new CppException((String)pending); + } + + /** Called by the callback trampolines when the Java callable throws. The exception is rethrown by the wrapper that made the C call. */ + public static void callbackFailed(Throwable error) + { + if (PENDING.get() == null) + PENDING.set(error); + } + + /** Creates an upcall stub for a static method of `cls`. The lookup must be able to see the method. */ + public static java.lang.foreign.MemorySegment upcall(java.lang.invoke.MethodHandles.Lookup lookup, Class cls, String name, java.lang.foreign.FunctionDescriptor desc) + { + try + { + return LINKER.upcallStub(lookup.findStatic(cls, name, desc.toMethodType()), desc, java.lang.foreign.Arena.global()); + } + catch (ReflectiveOperationException e) + { + throw new IllegalStateException(e); + } + } + + // The Java callables held by the `std::function` instances, keyed by the ids that are passed to C as the user data pointers. + // Each entry is the callable and its reference count: the copies of a `std::function` share the user data. + private static final java.util.concurrent.ConcurrentHashMap CALLBACKS = new java.util.concurrent.ConcurrentHashMap<>(); + private static final java.util.concurrent.atomic.AtomicLong NEXT_CALLBACK_ID = new java.util.concurrent.atomic.AtomicLong(1); + + /** Registers a callable and returns its user data pointer, with one reference. */ + public static java.lang.foreign.MemorySegment newCallbackState(Object callable) + { + long id = NEXT_CALLBACK_ID.getAndIncrement(); + CALLBACKS.put(id, new Object[]{callable, new java.util.concurrent.atomic.AtomicInteger(1)}); + return java.lang.foreign.MemorySegment.ofAddress(id); + } + + /** The callable registered under a user data pointer. */ + public static Object callbackState(java.lang.foreign.MemorySegment userdata) + { + Object[] entry = CALLBACKS.get(userdata.address()); + if (entry == null) + throw new IllegalStateException("Unknown callback state: " + userdata.address() + "."); + return entry[0]; + } + + // The `userdata_callback` of the C bindings: releases the user data of `this` object, then copies the other one into it, if any. + private static void callbackStateChanged(java.lang.foreign.MemorySegment thisUserdata, java.lang.foreign.MemorySegment otherUserdata) + { + java.lang.foreign.MemorySegment slot = thisUserdata.reinterpret(java.lang.foreign.ValueLayout.ADDRESS.byteSize()); + long current = slot.get(java.lang.foreign.ValueLayout.ADDRESS, 0).address(); + if (current != 0) + { + Object[] entry = CALLBACKS.get(current); + if (entry != null && ((java.util.concurrent.atomic.AtomicInteger)entry[1]).decrementAndGet() == 0) + CALLBACKS.remove(current); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, java.lang.foreign.MemorySegment.NULL); + } + if (otherUserdata.address() != 0) + { + Object[] entry = CALLBACKS.get(otherUserdata.address()); + if (entry != null) + ((java.util.concurrent.atomic.AtomicInteger)entry[1]).incrementAndGet(); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, otherUserdata); + } + } + + public static final java.lang.foreign.MemorySegment CALLBACK_STATE_STUB = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, "callbackStateChanged", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/Native.java b/test/output_java_fixed_typedefs/src/mrbind_test/Native.java index f9d8474e..30d65d27 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/Native.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/Native.java @@ -1,6 +1,6 @@ package mrbind_test; -/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +/** Implemented by the wrappers of native objects. */ public interface Native { /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java index a8beb2d3..8494bfba 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/a.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.A; -/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `A/a`. */ public final class a { private a() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_A_", "MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java index f8a4e425..f56227e8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/A/std_vector_MR_SeparateA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.A; -/** The downcall handles of the C bindings file `A/std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `A/std_vector_MR_SeparateA`. */ public final class std_vector_MR_SeparateA { private std_vector_MR_SeparateA() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java index 12044402..cdd2e937 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB; -/** The downcall handles of the C bindings file `AB/std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_pair_MR_SeparateA_MR_SeparateB { private std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java index e4a13562..7b68313a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB; -/** The downcall handles of the C bindings file `AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB { private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java index 053d5b1a..5fcaed0c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/AB_base/ab_base.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB_base; -/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB_base/ab_base`. */ public final class ab_base { private ab_base() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java index 7ff27b6b..85e3c65c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.B; -/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `B/b`. */ public final class b { private b() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_B_", "MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java index 6693dc72..afb1e511 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/B/std_vector_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.B; -/** The downcall handles of the C bindings file `B/std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `B/std_vector_MR_SeparateB`. */ public final class std_vector_MR_SeparateB { private std_vector_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java index 0b883a82..35518947 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/_1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/1`. */ public final class _1 { private _1() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java index a38f5279..f5c35f9f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ public final class test_abstract_classes { private test_abstract_classes() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java index ae649f6b..bdbee631 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. */ public final class test_adjusting_names { private test_adjusting_names() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java index e77aead6..23d71823 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_aggregates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_aggregates`. */ public final class test_aggregates { private test_aggregates() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java index e61dea09..d332e12e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. */ public final class test_arrays_of_incomplete_types { private test_arrays_of_incomplete_types() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java index c992d055..d6f17c03 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. */ public final class test_arrays_of_incomplete_types_2 { private test_arrays_of_incomplete_types_2() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java index 6d464b87..aead1bba 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_bases.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_bases`. */ public final class test_bases { private test_bases() {} @@ -17,14 +17,22 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -45,17 +53,28 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java index 9e52d501..a2a94fa6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. */ public final class test_combined_a_b { private test_combined_a_b() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java index ede36e45..7269189d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_conv_ops`. */ public final class test_conv_ops { private test_conv_ops() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java index 18e54c28..4fb4f94c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. */ public final class test_copy_inherited_members { private test_copy_inherited_members() {} @@ -41,34 +41,61 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -81,13 +108,25 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java index ad2c2367..b7f5420f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_csharp.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_csharp`. */ public final class test_csharp { private test_csharp() {} @@ -401,26 +401,31 @@ private H1() {} public static final java.lang.invoke.MethodHandle MR_CSharp_B_Construct = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Construct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_0 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_0", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_call_3 = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_call_3", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); - public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); } public static final class H2 { private H2() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sa", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Set_sa = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Set_sa", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_Get_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_Get_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_ClassMemberPointersBool_GetMutable_sb = mrbind_test.Ffi.downcall("", "MR_CSharp_ClassMemberPointersBool_GetMutable_sb", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); @@ -616,18 +621,31 @@ private H2() {} public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); } public static final class H3 { private H3() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -809,6 +827,12 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); @@ -827,12 +851,6 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H4 - { - private H4() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_Get_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_Get_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableK_Sentinel_GetMutable_ptr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableK_Sentinel_GetMutable_ptr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1008,9 +1026,19 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_SD_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SE_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SE_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1024,6 +1052,11 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SF_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1033,12 +1066,6 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsB_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H5 - { - private H5() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); @@ -1212,6 +1239,12 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_lshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_lshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsB_rshift_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsB_rshift_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + public static final java.lang.invoke.MethodHandle MR_C_compare_three_way_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compare_three_way_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_and_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_and_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_or_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_or_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1239,12 +1272,6 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsC = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsC", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_add_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_add_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H6 - { - private H6() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_sub_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_sub_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_mul_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_mul_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsC_div_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsC_div_assign", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java index 46bfd0e7..f66110e9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. */ public final class test_custom_preferred_names { private test_custom_preferred_names() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java index 2d1c9ac2..2f792da8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_declaration_order`. */ public final class test_declaration_order { private test_declaration_order() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java index d7791105..be854c6a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_deprecation.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_deprecation`. */ public final class test_deprecation { private test_deprecation() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java index 6d1a532d..516cd872 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. */ public final class test_includes_for_enum_constants { private test_includes_for_enum_constants() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java index 6d263071..6cd6a94f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. */ public final class test_includes_for_enum_constants_2 { private test_includes_for_enum_constants_2() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java index 4dc1659c..a6c1db34 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. */ public final class test_includes_for_enum_constants_3 { private test_includes_for_enum_constants_3() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java index 14b90d68..cf32410c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_iostream`. */ public final class test_iostream { private test_iostream() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java index 72709289..e3d4041b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. */ public final class test_lifetime_inference { private test_lifetime_inference() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java index e9fb1312..dda299b1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_matching_layout`. */ public final class test_matching_layout { private test_matching_layout() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java index 480d22f7..80b05b20 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_member_vars.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_member_vars`. */ public final class test_member_vars { private test_member_vars() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java index d101f32e..e429b601 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. */ public final class test_mention_blacklists { private test_mention_blacklists() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java index a98ac37d..c938a03e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. */ public final class test_nested_class_template_inst { private test_nested_class_template_inst() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java index 151f301e..ad966fcf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_nested_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_types`. */ public final class test_nested_types { private test_nested_types() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java index 8f399e92..c46e8cef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. */ public final class test_omitting_template_args_and_quals { private test_omitting_template_args_and_quals() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java index 5a68a556..ce5bdcde 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. */ public final class test_overloaded_operators { private test_overloaded_operators() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java index 9ccccfc2..ea5bd2c6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_overloads.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloads`. */ public final class test_overloads { private test_overloads() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java index ac1cdc90..01ffd4ab 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_phmap.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_phmap`. */ public final class test_phmap { private test_phmap() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java index 88ff3f57..1bb51a80 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_simple_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_simple_types`. */ public final class test_simple_types { private test_simple_types() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java index 5d44359e..382ecaaa 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. */ public final class test_size_t_ptrdiff_t { private test_size_t_ptrdiff_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java index f1670f9a..d6880507 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_static_memberr`. */ public final class test_static_memberr { private test_static_memberr() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java index 2aa6191c..f70f5818 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_containers.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_containers`. */ public final class test_std_containers { private test_std_containers() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java index 91102810..88ec684d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_expected.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_expected`. */ public final class test_std_expected { private test_std_expected() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java index a1136b31..6f7d572c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. */ public final class test_std_filesystem { private test_std_filesystem() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java index 798efe87..4167153f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_function.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_function`. */ public final class test_std_function { private test_std_function() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java index 7350f68b..9484cdac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_optional.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_optional`. */ public final class test_std_optional { private test_std_optional() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java index 1f445355..c3210bb9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. */ public final class test_std_shared_ptr { private test_std_shared_ptr() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java index f18d09b9..b4897179 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string`. */ public final class test_std_string { private test_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java index 6f7e95cb..160182b4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string_view`. */ public final class test_std_string_view { private test_std_string_view() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java index 37f0e2c3..4fc442e3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. */ public final class test_std_tuple_like { private test_std_tuple_like() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java index 582bbab5..84f400d6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. */ public final class test_std_unique_ptr { private test_std_unique_ptr() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java index cb08b206..e70d8ffc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_tags.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_tags`. */ public final class test_tags { private test_tags() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java index 5671e0f9..bd08f4cb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. */ public final class test_typedefs_in_templates { private test_typedefs_in_templates() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java index 6fcba0d6..7190b3b5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_using_decls.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ public final class test_using_decls { private test_using_decls() {} @@ -26,5 +26,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java index 3c3aae29..97fc13c5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/MR/test_variant.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_variant`. */ public final class test_variant { private test_variant() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java index eb92dadc..856960ee 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_E1_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_E1_float`. */ public final class expected_MR_CSharp_E1_float { private expected_MR_CSharp_E1_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java index 4075a946..d5f76fb5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayoutSh_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayoutSh_float`. */ public final class expected_MR_CSharp_ExposedLayoutSh_float { private expected_MR_CSharp_ExposedLayoutSh_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java index e4f11715..a54a04f4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_ExposedLayout_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_ExposedLayout_float`. */ public final class expected_MR_CSharp_ExposedLayout_float { private expected_MR_CSharp_ExposedLayout_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java index eb6eae2b..286aec24 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_NonTrivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_NonTrivial_float`. */ public final class expected_MR_CSharp_NonTrivial_float { private expected_MR_CSharp_NonTrivial_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java index 517c6c03..6b82fef6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_SA_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_SA_float`. */ public final class expected_MR_CSharp_SA_float { private expected_MR_CSharp_SA_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java index 1adcadc0..8708dab9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_MR_CSharp_Trivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_MR_CSharp_Trivial_float`. */ public final class expected_MR_CSharp_Trivial_float { private expected_MR_CSharp_Trivial_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java index b41c8320..be5c17a7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_int32_t_float`. */ public final class expected_int32_t_float { private expected_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java index 8190d2b0..b86acbbf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_int32_t_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_int32_t_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_int32_t_std_string`. */ public final class expected_int32_t_std_string { private expected_int32_t_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java index 701d8c06..312fa6da 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/expected_void_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `expected_void_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `expected_void_float`. */ public final class expected_void_float { private expected_void_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java index 1af4cd30..6a3b207f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `iostream`. */ public final class iostream { private iostream() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java index 9e25fd89..4bd85ce8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_map_int32_t_float`. */ public final class phmap_btree_map_int32_t_float { private phmap_btree_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java index 71d53f9e..7b3cc793 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multimap_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multimap_int32_t_float`. */ public final class phmap_btree_multimap_int32_t_float { private phmap_btree_multimap_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java index 3758f22d..82b7683d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_multiset_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multiset_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multiset_int32_t`. */ public final class phmap_btree_multiset_int32_t { private phmap_btree_multiset_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java index a8261fd9..07664170 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_btree_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_set_int32_t`. */ public final class phmap_btree_set_int32_t { private phmap_btree_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java index 41907ea6..f77c8a1d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int32_t_float`. */ public final class phmap_flat_hash_map_int32_t_float { private phmap_flat_hash_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java index 39bd3381..4ffefd68 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_flat_hash_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int32_t`. */ public final class phmap_flat_hash_set_int32_t { private phmap_flat_hash_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java index 525e6587..31aa3b13 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_map_int32_t_float`. */ public final class phmap_node_hash_map_int32_t_float { private phmap_node_hash_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java index e7a36fca..5fd32167 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_node_hash_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_set_int32_t`. */ public final class phmap_node_hash_set_int32_t { private phmap_node_hash_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java index 141c81f3..563f5839 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int32_t_float`. */ public final class phmap_parallel_flat_hash_map_int32_t_float { private phmap_parallel_flat_hash_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java index 4bca94b5..3c8e8399 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int32_t`. */ public final class phmap_parallel_flat_hash_set_int32_t { private phmap_parallel_flat_hash_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java index ee541326..7b2b150b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int32_t_float`. */ public final class phmap_parallel_node_hash_map_int32_t_float { private phmap_parallel_node_hash_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java index 9fec1a18..4ea0273d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int32_t`. */ public final class phmap_parallel_node_hash_set_int32_t { private phmap_parallel_node_hash_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java index 5cc3ac9a..abf67648 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. */ public final class std_array_MR_StdContainers_A_42 { private std_array_MR_StdContainers_A_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java index db4ef900..f60b8bd9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. */ public final class std_array_MR_StdContainers_NonAssignable_42 { private std_array_MR_StdContainers_NonAssignable_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java index 102fa0e4..436537f0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_43.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int32_t_43`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int32_t_43`. */ public final class std_array_int32_t_43 { private std_array_int32_t_43() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java index cab96b32..8bb3fb97 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_array_int32_t_array_4_array_3_5.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int32_t_array_4_array_3_5`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int32_t_array_4_array_3_5`. */ public final class std_array_int32_t_array_4_array_3_5 { private std_array_int32_t_array_4_array_3_5() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java index 5311eb69..6d9c4748 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. */ public final class std_deque_MR_StdContainers_NonAssignable { private std_deque_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java index d63f749d..41e0b031 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_deque_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_int32_t`. */ public final class std_deque_int32_t { private std_deque_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java index 8c29e384..eeb4a594 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_filesystem_path.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_filesystem_path`. */ public final class std_filesystem_path { private std_filesystem_path() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index bba6c24a..906da660 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. */ public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 { private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index 0ff77b94..8bed5155 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. */ public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC { private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java index e64172e5..9d3583fc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. */ public final class std_function_MR_StdFunction_A { private std_function_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java index 320c5965..a9f1ceff 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E`. */ public final class std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E { private std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java index 77249d27..a8b388fa 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int32_t`. */ public final class std_function_int32_t { private std_function_int32_t() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java index e6764bfd..c81a44d2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_int32_t_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int32_t_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int32_t_from_int32_t_int32_t`. */ public final class std_function_int32_t_from_int32_t_int32_t { private std_function_int32_t_from_int32_t_int32_t() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_int32_t_int32_t_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_int32_t_int32_t_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java index e9fdb82f..474d4894 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int32_t_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int32_t_from_std_string`. */ public final class std_function_int32_t_from_std_string { private std_function_int32_t_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java index a6a069b6..28f48f4c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref`. */ public final class std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref { private std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java index a6727072..3bd58a58 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_int32_t_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int32_t_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int32_t_rvalue_ref`. */ public final class std_function_int32_t_rvalue_ref { private std_function_int32_t_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int32_t_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int32_t_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java index ec6344ec..18c60b94 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_float`. */ public final class std_function_std_string_from_int32_t_float { private std_function_std_string_from_int32_t_float() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_float_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_float_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java index 2333c5e9..acdbc924 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_std_string_from_int32_t_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int32_t_int32_t`. */ public final class std_function_std_string_from_int32_t_int32_t { private std_function_std_string_from_int32_t_int32_t() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int32_t_int32_t_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int32_t_int32_t_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java index ebfa3a4f..b2be91d1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void`. */ public final class std_function_void { private std_function_void() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java index 2e84d3df..31e86a6c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. */ public final class std_function_void_from_MR_StdFunction_A { private std_function_void_from_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java index 8f5817ec..60b6dea2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_int32_t_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_int32_t_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_int32_t_int32_t`. */ public final class std_function_void_from_int32_t_int32_t { private std_function_void_from_int32_t_int32_t() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int32_t_int32_t_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int32_t_int32_t_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java index f461d793..3b6161ae 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. */ public final class std_function_void_from_std_string { private std_function_void_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java index 68c6eaea..6f238a58 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. */ public final class std_list_MR_StdContainers_NonAssignable { private std_list_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java index 4f306800..490552a6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_list_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_int32_t`. */ public final class std_list_int32_t { private std_list_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java index 5621fc6f..b2b9a292 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. */ public final class std_map_MR_StdContainers_NonAssignable_float { private std_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java index 32638f65..a11cf576 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_int32_t_float`. */ public final class std_map_int32_t_float { private std_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java index 722ad6f8..56ecec09 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_multimap_MR_StdContainers_NonAssignable_float { private std_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java index 47819c3a..a1ec40c4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multimap_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_int32_t_float`. */ public final class std_multimap_int32_t_float { private std_multimap_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java index 1a02113a..314caf03 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. */ public final class std_multiset_MR_StdContainers_NonAssignable { private std_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java index 386a415d..4fa3463f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_float`. */ public final class std_multiset_float { private std_multiset_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java index 636a921b..39433c69 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_multiset_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_int32_t`. */ public final class std_multiset_int32_t { private std_multiset_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java index 2e391f50..b6ac1fd1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. */ public final class std_optional_MR_CSharp_ExposedLayoutSh { private std_optional_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java index 10bee38b..15cae432 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. */ public final class std_optional_MR_CSharp_NonTrivial { private std_optional_MR_CSharp_NonTrivial() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java index 13ff2ba8..3282e9d2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. */ public final class std_optional_MR_CSharp_SA { private std_optional_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java index cde44112..a4186168 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. */ public final class std_optional_MR_CSharp_Trivial { private std_optional_MR_CSharp_Trivial() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java index 41f59d25..2c7ec0ae 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. */ public final class std_optional_MR_StdOptional_A { private std_optional_MR_StdOptional_A() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java index f091760c..ee11b710 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. */ public final class std_optional_MR_StdOptional_B { private std_optional_MR_StdOptional_B() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java index 26c2b8ea..b339627b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. */ public final class std_optional_MR_StdOptional_E { private std_optional_MR_StdOptional_E() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java index 6d79b24e..0f4ff6a4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_int32_t`. */ public final class std_optional_int32_t { private std_optional_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java index 7420f29f..5ea915b4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_optional_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_std_string`. */ public final class std_optional_std_string { private std_optional_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java index 88f72999..9a6495e0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. */ public final class std_pair_const_MR_StdContainers_NonAssignable_float { private std_pair_const_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java index 735a0a05..045a8858 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int32_t_float`. */ public final class std_pair_const_int32_t_float { private std_pair_const_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java index 59a1e6aa..f2c39c34 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_ref_const_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int32_t_ref_const_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int32_t_ref_const_float_ref`. */ public final class std_pair_const_int32_t_ref_const_float_ref { private std_pair_const_int32_t_ref_const_float_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java index 9578cd6d..bfb1e927 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref`. */ public final class std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref { private std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java index 5815f264..61b822ca 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int32_t_float`. */ public final class std_pair_int32_t_float { private std_pair_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java index 2fc9da33..3f3fe455 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_ref_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int32_t_ref_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int32_t_ref_float_ref`. */ public final class std_pair_int32_t_ref_float_ref { private std_pair_int32_t_ref_float_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java index 24d4c9b1..66c242b8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int32_t_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int32_t_rvalue_ref_float_rvalue_ref`. */ public final class std_pair_int32_t_rvalue_ref_float_rvalue_ref { private std_pair_int32_t_rvalue_ref_float_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java index cf394503..b7a94b34 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_pair_int32_t_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int32_t_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int32_t_std_string`. */ public final class std_pair_int32_t_std_string { private std_pair_int32_t_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java index 57a1ce96..1263684d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. */ public final class std_set_MR_StdContainers_NonAssignable { private std_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java index 47712d97..95c94dc8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_float`. */ public final class std_set_float { private std_set_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java index fd51c01e..2216bb6d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_int32_t`. */ public final class std_set_int32_t { private std_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java index aae58f97..dbc896b8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. */ public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh { private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java index c17dc3ec..cccfe2cb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. */ public final class std_shared_ptr_MR_CSharp_SA { private std_shared_ptr_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java index 5dcf8ce6..274d1a0d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. */ public final class std_shared_ptr_MR_CSharp_SE { private std_shared_ptr_MR_CSharp_SE() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java index 00f8de85..79cc6ffd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. */ public final class std_shared_ptr_MR_CSharp_SG { private std_shared_ptr_MR_CSharp_SG() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java index a1b6747e..19805dd4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. */ public final class std_shared_ptr_MR_CommonBaseAB { private std_shared_ptr_MR_CommonBaseAB() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java index d476159b..cb1ba328 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_MR_StdSharedPtr_A { private std_shared_ptr_MR_StdSharedPtr_A() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java index 8ddc8375..bc74688d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array { private std_shared_ptr_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java index 33a54a0a..8af41b39 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java index cf59e707..98d5526b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. */ public final class std_shared_ptr_const_MR_CSharp_SA { private std_shared_ptr_const_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java index 3709e4fe..20832f16 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A { private std_shared_ptr_const_MR_StdSharedPtr_A() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java index 7fdac6d8..ff6f8f39 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array { private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java index 6326b139..1a9103ba 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java index 540761bf..9700a3bf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t`. */ public final class std_shared_ptr_const_int32_t { private std_shared_ptr_const_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java index 7367967d..a9e0f273 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array`. */ public final class std_shared_ptr_const_int32_t_array { private std_shared_ptr_const_int32_t_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java index 98504629..428ec1a7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_int32_t_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int32_t_array_42`. */ public final class std_shared_ptr_const_int32_t_array_42 { private std_shared_ptr_const_int32_t_array_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java index 7aa5bde9..fc26ab1a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. */ public final class std_shared_ptr_const_void { private std_shared_ptr_const_void() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java index aded4de4..aa540f02 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t`. */ public final class std_shared_ptr_int32_t { private std_shared_ptr_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java index 10f2a40d..4e214a53 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array`. */ public final class std_shared_ptr_int32_t_array { private std_shared_ptr_int32_t_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java index b1a4925d..e5bee71f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_int32_t_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int32_t_array_42`. */ public final class std_shared_ptr_int32_t_array_42 { private std_shared_ptr_int32_t_array_42() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java index e4de6a56..aa5ddfb3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_void`. */ public final class std_shared_ptr_void { private std_shared_ptr_void() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java index 4e0bdf26..be5b9c6e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string`. */ public final class std_string { private std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java index 00e81830..77b66045 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string_view`. */ public final class std_string_view { private std_string_view() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java index 8cbe446e..336ea3bf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple`. */ public final class std_tuple { private std_tuple() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java index 8133ed79..c0356ab6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. */ public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout { private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java index b4af3042..97fb581a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref { private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java index 4014137c..4764212a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref { private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java index c9175330..f14ee396 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db`. */ public final class std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db { private std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java index 65d074c8..d2051726 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b`. */ public final class std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b { private std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java index 27e03114..064459d5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_const_int32_t_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int32_t_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int32_t_std_string`. */ public final class std_tuple_const_int32_t_std_string { private std_tuple_const_int32_t_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java index 333a02a8..b70c96e7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_float_double_int32_t_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_float_double_int32_t_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_float_double_int32_t_int32_t`. */ public final class std_tuple_float_double_int32_t_int32_t { private std_tuple_float_double_int32_t_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java index 7da7ec38..b243c291 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int32_t`. */ public final class std_tuple_int32_t { private std_tuple_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java index 924a6744..9667fb6b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int32_t_float`. */ public final class std_tuple_int32_t_float { private std_tuple_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java index b1bec41c..836573be 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. */ public final class std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref { private std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java index 2b528db8..5bad0d3a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_tuple_int32_t_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int32_t_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int32_t_std_string`. */ public final class std_tuple_int32_t_std_string { private std_tuple_int32_t_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java index 5b7a55ab..78817e69 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. */ public final class std_unique_ptr_MR_StdUniquePtr_A { private std_unique_ptr_MR_StdUniquePtr_A() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java index 86f55711..49d7c0d2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. */ public final class std_unique_ptr_MR_StdUniquePtr_A_array { private std_unique_ptr_MR_StdUniquePtr_A_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java index 3e966821..0b439268 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int32_t`. */ public final class std_unique_ptr_int32_t { private std_unique_ptr_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java index f11a0d00..d473674e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unique_ptr_int32_t_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int32_t_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int32_t_array`. */ public final class std_unique_ptr_int32_t_array { private std_unique_ptr_int32_t_array() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java index 4b9cd7ac..c66b1bdd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_map_MR_StdContainers_NonAssignable_float { private std_unordered_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java index 2bf218af..59382d8c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_map_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_int32_t_float`. */ public final class std_unordered_map_int32_t_float { private std_unordered_map_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java index 805d3ea0..1f41462b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float { private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java index ef768079..e7a88626 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multimap_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_int32_t_float`. */ public final class std_unordered_multimap_int32_t_float { private std_unordered_multimap_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java index c33c45fd..5aed4634 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. */ public final class std_unordered_multiset_MR_StdContainers_NonAssignable { private std_unordered_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java index 129e91e9..cf968a1c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_multiset_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_int32_t`. */ public final class std_unordered_multiset_int32_t { private std_unordered_multiset_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java index b6f73a1c..05948578 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. */ public final class std_unordered_set_MR_StdContainers_NonAssignable { private std_unordered_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java index 357d814f..722776ef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_unordered_set_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_int32_t`. */ public final class std_unordered_set_int32_t { private std_unordered_set_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java index 1f8bf10c..8523de08 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int32_t_float`. */ public final class std_variant_int32_t_float { private std_variant_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java index a88ed3e5..e7827e65 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int32_t_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int32_t_float_float`. */ public final class std_variant_int32_t_float_float { private std_variant_int32_t_float_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java index 9829ceea..88c8c43d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_int32_t_float_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int32_t_float_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int32_t_float_std_string`. */ public final class std_variant_int32_t_float_std_string { private std_variant_int32_t_float_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java index 2d5600f7..1ea1402d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float`. */ public final class std_variant_std_monostate_int32_t_float { private std_variant_std_monostate_int32_t_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java index ff3af79b..eb1c69f0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_variant_std_monostate_int32_t_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int32_t_float_float`. */ public final class std_variant_std_monostate_int32_t_float_float { private std_variant_std_monostate_int32_t_float_float() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java index a4e51525..79f6018a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_A`. */ public final class std_vector_MR_A { private std_vector_MR_A() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java index f79d0158..eb25b044 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. */ public final class std_vector_MR_CSharp_A_ptr { private std_vector_MR_CSharp_A_ptr() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java index 7bd0bb53..cd63cb4b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. */ public final class std_vector_MR_CSharp_ExposedLayout { private std_vector_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java index d347fddd..704835c9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. */ public final class std_vector_MR_StdContainers_NonAssignable { private std_vector_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java index 529230bb..94d8fa56 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. */ public final class std_vector_MR_StdContainers_NonDefaultConstructible { private std_vector_MR_StdContainers_NonDefaultConstructible() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java index f8a752ed..70b1b304 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. */ public final class std_vector_const_MR_CSharp_A_ptr { private std_vector_const_MR_CSharp_A_ptr() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java index da3a1781..eb9415f8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_expected_int32_t_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_expected_int32_t_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_expected_int32_t_std_string`. */ public final class std_vector_expected_int32_t_std_string { private std_vector_expected_int32_t_std_string() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java index a2030081..b1bf2f25 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int32_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_int32_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_int32_t`. */ public final class std_vector_int32_t { private std_vector_int32_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java index 02ded0de..5400a8f1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_int64_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_int64_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_int64_t`. */ public final class std_vector_int64_t { private std_vector_int64_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java index cf72279e..86a7b033 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/ffi/std_vector_uint64_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_uint64_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_uint64_t`. */ public final class std_vector_uint64_t { private std_vector_uint64_t() {} diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java index 0e7b8b0e..c525dc14 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.A assignFromAnother(mrbind_test.mr.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.cs.std_string x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void setX(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java index 15628025..651602c6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/CommonBaseAB.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ public mrbind_test.mr.CommonBaseAB assignFromAnother(mrbind_test.mr.CommonBaseAB try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java index 42a7a99a..28ed7490 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_vector_MR_A foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.cs.std_vector_MR_A _1) try { mrbind_test.ffi.MR._1.H0.MR_bar.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -56,6 +58,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB mark_shared_commo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_mark_shared_common_base_ab.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -74,6 +77,7 @@ public static mrbind_test.mr.cs.std_vector_MR_SeparateA GetSeparateVecA() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_GetSeparateVecA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -92,6 +96,7 @@ public static mrbind_test.mr.cs.std_vector_MR_SeparateB GetSeparateVecB() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_GetSeparateVecB.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -110,6 +115,7 @@ public static mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB Ge try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_combined_a_b.H0.MR_GetCombinedVecAB.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java index a642c4fb..6d96c068 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateA.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java index 860759b4..0540f87b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/SeparateB.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java index 67833c53..a55dd2c6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/A.java @@ -21,6 +21,7 @@ public void foo() try { mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java index 14d768cc..e35d3ed0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/B.java @@ -36,6 +36,7 @@ public void foo() try { mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java index 51287160..1b6aea5f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/abstractclasses/C.java @@ -25,4 +25,64 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) throw mrbind_test.Ffi.rethrow(e); } } + + /** Upcasts to the base class `MR::AbstractClasses::B`. The result refers to this object. + * + * Calls `MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B()`. */ + public mrbind_test.mr.abstractclasses.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B.invokeExact(rawPointer()); + return new mrbind_test.mr.abstractclasses.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::AbstractClasses::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C staticDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::AbstractClasses::B`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C dynamicDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java index dd8b19b6..18e21c69 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/A.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public long convertTo_uint64_t() try { long __ret = (long)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConvertTo_uint64_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.adjustingnames.A assignFromAnother(mrbind_test.mr.adjustin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.adjustingnames.A(__ret, false, __owner); } @@ -133,6 +137,7 @@ public void foo() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -154,6 +159,7 @@ public void bar() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +181,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_uint64_t.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -194,6 +201,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_uint64_t.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java index 9c07a3d2..49732040 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/adjustingnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.adjustingnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -18,6 +18,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void bar() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_bar.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java index 1c58c8df..6eb4c8e4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/A.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x, java. { java.lang.foreign.MemorySegment __str_y = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(y, "y")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFrom.invokeExact(x, __str_y, mrbind_test.Ffi.end(__str_y)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.aggregates.A assignFromAnother(mrbind_test.mr.aggregates.A try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.A(__ret, false, __owner); } @@ -138,6 +142,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -161,6 +166,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -183,6 +189,7 @@ public mrbind_test.mr.cs.std_string y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -208,6 +215,7 @@ public void setY(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java index 1dbcbb83..fa2565ef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/B.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.aggregates.B assignFromAnother(mrbind_test.mr.aggregates.B try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java index e5c5a396..9dd76785 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -117,6 +120,7 @@ public mrbind_test.mr.aggregates.C assignFromAnother(mrbind_test.mr.aggregates.C try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.C(__ret, false, __owner); } @@ -142,6 +146,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -165,6 +170,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -187,6 +193,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -210,6 +217,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -232,6 +240,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -255,6 +264,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -277,6 +287,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -300,6 +311,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -322,6 +334,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -345,6 +358,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +381,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -390,6 +405,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -412,6 +428,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -435,6 +452,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -457,6 +475,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -480,6 +499,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java index 8dbd994e..b4c31fb7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/D.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.aggregates.D assignFromAnother(mrbind_test.mr.aggregates.D try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.D(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -155,6 +160,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -223,6 +231,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -245,6 +254,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +301,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -313,6 +325,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -335,6 +348,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -380,6 +395,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -403,6 +419,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -448,6 +466,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -470,6 +489,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -493,6 +513,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java index 14e509fe..3b6e6a79 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/E.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -76,6 +77,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i, mrbind_test.Ffi.ptrNonNull(j, "j")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -99,6 +101,7 @@ public mrbind_test.mr.aggregates.E assignFromAnother(mrbind_test.mr.aggregates.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.E(__ret, false, __owner); } @@ -125,6 +128,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -149,6 +153,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +177,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -196,6 +202,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -219,6 +226,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -243,6 +251,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +275,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -290,6 +300,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +324,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -337,6 +349,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -360,6 +373,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -384,6 +398,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -407,6 +422,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -431,6 +447,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +471,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -478,6 +496,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -501,6 +520,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -525,6 +545,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -548,6 +569,7 @@ public mrbind_test.mr.aggregates.NonDefaultConstructible j() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); } @@ -573,6 +595,7 @@ public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java index 2c1975e4..519a6f4d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public mrbind_test.mr.aggregates.NonDefaultConstructible assignFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java index a100b584..90d91fef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/A.java @@ -51,6 +51,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -75,6 +76,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -98,6 +100,7 @@ public mrbind_test.mr.bases.A assignFromAnother(mrbind_test.mr.bases.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java index 396fb8d5..d46a312d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.B(__ret, false, __owner); } @@ -107,4 +110,44 @@ public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java index 5e992aa0..04210068 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/B2.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.B2(__ret, false, __owner); } @@ -103,4 +106,84 @@ public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::Bases::B`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_B()`. */ + public mrbind_test.mr.bases.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_B.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::B`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromB(mrbind_test.mr.bases.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java index a7d62d1c..a8d4ec07 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/C.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.C(__ret, false, __owner); } @@ -104,4 +107,44 @@ public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_C_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.C staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java index 31d7a8b3..8d5bf1eb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.D assignFromAnother(mrbind_test.mr.bases.D _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java index 75d36cd7..5bff36d9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D2.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.D2 assignFromAnother(mrbind_test.mr.bases.D2 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D2(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java index e8f31dbb..200c7d58 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/D3.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.D3 assignFromAnother(mrbind_test.mr.bases.D3 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D3(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java index fd4f95ab..f48fb98c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/E.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.bases.E assignFromAnother(mrbind_test.mr.bases.E _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.E(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java index 1fb06238..81ce9f6f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/F.java @@ -46,6 +46,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.F(__ret, false, __owner); } @@ -106,4 +109,44 @@ public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_F_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E()`. */ + public static mrbind_test.mr.bases.F staticDowncastFromE(mrbind_test.mr.bases.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java index 22ddd4d1..a0cbdaf8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/G.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.G(__ret, false, __owner); } @@ -103,4 +106,44 @@ public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java index 201dfda9..135e73e7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/H.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.H(__ret, false, __owner); } @@ -105,4 +108,84 @@ public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.H staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java index b4c1d375..c6211ec0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/bases/I.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.I(__ret, false, __owner); } @@ -104,4 +107,64 @@ public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java index 447c528d..5760a6a2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/convops/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -84,6 +86,7 @@ public boolean convertTo_bool() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConvertTo_bool.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public mrbind_test.mr.convops.A assignFromAnother(mrbind_test.mr.convops.A _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.convops.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java index c5f8cf9f..028c87d1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -55,6 +55,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -79,6 +80,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -103,6 +105,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -125,6 +128,7 @@ public int convertTo_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConvertTo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -148,6 +152,7 @@ public mrbind_test.mr.copyinheritedmembers.A assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, __owner); } @@ -172,6 +177,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +199,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -210,6 +217,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -229,6 +237,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +256,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -270,6 +280,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java index c714315b..d66f2765 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public int convertTo_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConvertTo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -138,6 +142,7 @@ public mrbind_test.mr.copyinheritedmembers.B assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, __owner); } @@ -162,6 +167,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -183,6 +189,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -219,6 +227,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -260,6 +270,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java index 012b1910..06120dd8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, __owner); } @@ -102,4 +105,84 @@ public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java index c997ee4f..6d14e3d7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, __owner); } @@ -105,4 +108,44 @@ public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `D`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.D staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java index a7c27e18..79b2d076 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, __owner); } @@ -104,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java index 0bf68086..e5d2d3e6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, __owner); } @@ -104,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java index 2abb5887..a573681c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, __owner); } @@ -107,4 +110,24 @@ public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java index 9b1ecf78..9f132a38 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, __owner); } @@ -103,4 +106,64 @@ public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.H staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java index 84e4cce3..8ca084a6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, __owner); } @@ -103,4 +106,64 @@ public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `I`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.I staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java index 777f1f91..bfd05649 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -49,6 +49,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -73,6 +74,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -96,6 +98,7 @@ public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, __owner); } @@ -109,4 +112,44 @@ public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `J`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.J staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java index 3230b2ca..7134f071 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/K.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.K assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.K(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java index 5cc2c84f..58b3e2a5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/L.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.L assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.L(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java index 02af22bb..6f5ce443 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -49,6 +49,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -73,6 +74,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -96,6 +98,7 @@ public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, __owner); } @@ -109,4 +112,44 @@ public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java index 3562890d..c542e44e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -48,6 +48,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -72,6 +73,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -95,6 +97,7 @@ public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, __owner); } @@ -108,4 +111,84 @@ public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `N`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.N staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java index 65789897..101ba28a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, __owner); } @@ -107,4 +110,124 @@ public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::N`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N()`. */ + public mrbind_test.mr.copyinheritedmembers.N upcastToN() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::N`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromN(mrbind_test.mr.copyinheritedmembers.N object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java index aab38b96..c3bddb20 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.cs; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrb try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -39,6 +40,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +64,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_te try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +88,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbi try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +112,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterato try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +136,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_it try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +160,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, m try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +184,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +208,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterato try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -223,6 +232,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_it try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +256,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, m try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -269,6 +280,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -292,6 +304,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_S try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +328,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +352,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_S try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -361,6 +376,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -384,6 +400,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_co try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -407,6 +424,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -430,6 +448,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_it try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -453,6 +472,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -476,6 +496,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdCout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCout.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -495,6 +516,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdCerr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCerr.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -514,6 +536,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdClog() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdClog.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -533,6 +556,7 @@ public static mrbind_test.mr.cs.std_istream GetStdCin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCin.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_istream(__ret, __owner); } @@ -552,6 +576,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iter try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -575,6 +600,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -598,6 +624,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -621,6 +648,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +672,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_cons try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -667,6 +696,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +720,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iter try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -713,6 +744,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +768,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_set_int32_t_cons try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_flat_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -759,6 +792,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int32_t_floa try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -782,6 +816,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int32_t_floa try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -805,6 +840,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_set_int32_t_cons try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_node_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -828,6 +864,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int32_t_floa try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -851,6 +888,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int32_t_floa try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -874,6 +912,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -897,6 +936,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -920,6 +960,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -943,6 +984,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -966,6 +1008,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -989,6 +1032,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1012,6 +1056,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_set_int32_t_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_equal_MR_C_phmap_btree_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1035,6 +1080,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int32_t_float_co try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1058,6 +1104,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int32_t_float_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1081,6 +1128,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multiset_int32_t_con try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_equal_MR_C_phmap_btree_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1104,6 +1152,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1127,6 +1176,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1150,6 +1200,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1173,6 +1224,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1196,6 +1248,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbin try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1219,6 +1272,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1242,6 +1296,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1265,6 +1320,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1288,6 +1344,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1311,6 +1368,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_iterator a, m try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1334,6 +1392,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int32_t_const_iterator a, try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_sub_MR_C_std_vector_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1357,6 +1416,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int32_t_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_equal_MR_C_std_vector_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1380,6 +1440,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int32_t_iterator a, mrbind try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_sub_MR_C_std_vector_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1403,6 +1464,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int32_t_iterator a, m try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_equal_MR_C_std_vector_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1426,6 +1488,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_int32_t_const_iterator a, m try { long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_sub_MR_C_std_deque_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1449,6 +1512,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_int32_t_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_equal_MR_C_std_deque_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1472,6 +1536,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_int32_t_iterator a, mrbind_ try { long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_sub_MR_C_std_deque_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1495,6 +1560,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_int32_t_iterator a, mr try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_equal_MR_C_std_deque_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1518,6 +1584,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_int32_t_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_equal_MR_C_std_list_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1541,6 +1608,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_int32_t_iterator a, mrb try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_equal_MR_C_std_list_int32_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1564,6 +1632,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_int32_t_const_iterator a try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_equal_MR_C_std_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1587,6 +1656,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_int32_t_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_equal_MR_C_std_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1610,6 +1680,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_int32_t_const_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_equal_MR_C_std_unordered_set_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1633,6 +1704,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_int32_t_c try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_equal_MR_C_std_unordered_multiset_int32_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1656,6 +1728,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_int32_t_float_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_equal_MR_C_std_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1679,6 +1752,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_int32_t_float_iterator a try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_equal_MR_C_std_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1702,6 +1776,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int32_t_float_const try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1725,6 +1800,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int32_t_float_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1748,6 +1824,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int32_t_float_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_map_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1771,6 +1848,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int32_t_float_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_map_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1794,6 +1872,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1817,6 +1896,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int32_t_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1840,6 +1920,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_float_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_equal_MR_C_std_multiset_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1863,6 +1944,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_float_const_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_equal_MR_C_std_set_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1886,6 +1968,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaul try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1909,6 +1992,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1932,6 +2016,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaul try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1955,6 +2040,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1978,6 +2064,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssign try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2001,6 +2088,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2024,6 +2112,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssign try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2047,6 +2136,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2070,6 +2160,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssigna try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2093,6 +2184,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2116,6 +2208,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssigna try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2139,6 +2232,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2162,6 +2256,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2185,6 +2280,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2208,6 +2304,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2231,6 +2328,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2254,6 +2352,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2277,6 +2376,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2300,6 +2400,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2323,6 +2424,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2346,6 +2448,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2369,6 +2472,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2392,6 +2496,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2415,6 +2520,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2438,6 +2544,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2461,6 +2568,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2484,6 +2592,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_expected_int32_t_std_strin try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2507,6 +2616,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_expected_int32_t_std_ try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2530,6 +2640,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_expected_int32_t_std_strin try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_sub_MR_C_std_vector_expected_int32_t_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2553,6 +2664,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_expected_int32_t_std_ try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_equal_MR_C_std_vector_expected_int32_t_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java index 820e7284..9af50f6d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_E1_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_E1_float othe try { mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.E1 value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_E1_float.H0.MR_C_expected_MR_CSharp_E1_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java index 4c0eecc8..61a13a5c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayoutSh_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout try { mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_expected_MR_CSharp_ExposedLayoutSh_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java index 72c44239..4b875c9c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_ExposedLayout_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout try { mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ExposedLayout value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.ExposedLayout value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_ExposedLayout_float.H0.MR_C_expected_MR_CSharp_ExposedLayout_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java index 7576c34a..3eedaaf9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_NonTrivial_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_fl try { mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.NonTrivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.NonTrivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_NonTrivial_float.H0.MR_C_expected_MR_CSharp_NonTrivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java index 5ae35ef8..acf4925e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_SA_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_SA_float othe try { mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.SA value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.SA value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_SA_float.H0.MR_C_expected_MR_CSharp_SA_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java index ab4ab472..25ea9890 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_MR_CSharp_Trivial_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float try { mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.Trivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.Trivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_MR_CSharp_Trivial_float.H0.MR_C_expected_MR_CSharp_Trivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java index 701d8cb2..7db3d241 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_int32_t_float other) try { mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_float.H0.MR_C_expected_int32_t_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java index 2dc5e320..88180287 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_int32_t_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_int32_t_std_string othe try { mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public mrbind_test.mr.cs.std_string error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -177,6 +183,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public mrbind_test.mr.cs.std_string error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_int32_t_std_string.H0.MR_C_expected_int32_t_std_string_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java index 7720f0b1..19abea54 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/expected_void_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.expected_void_float other) try { mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean value() try { boolean __ret = (boolean)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.expected_void_float.H0.MR_C_expected_void_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java index 403ce62b..8b73fe8e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 try { mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.A at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -225,6 +233,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -248,6 +257,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -271,6 +281,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java index 57e3e512..a0963b96 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -81,6 +83,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -105,6 +108,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -128,6 +132,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java index 364c23ca..8cfda3a9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void clear() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -218,6 +226,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -242,6 +251,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -266,6 +276,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -290,6 +301,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -314,6 +326,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -338,6 +351,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -360,6 +374,7 @@ public void pop_back() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -382,6 +397,7 @@ public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -404,6 +420,7 @@ public void pop_front() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -426,6 +443,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -448,6 +466,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignab try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -472,6 +491,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator begin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -494,6 +514,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignab try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -518,6 +539,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -540,6 +562,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -564,6 +587,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator end_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -586,6 +610,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -609,6 +634,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_ try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -632,6 +658,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_ try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java index 839bd273..cc703535 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java index 794591d9..07fc84dd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java index 59601cad..52ee78ec 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t other) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -282,6 +293,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -328,6 +341,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -374,6 +389,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -397,6 +413,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -418,6 +435,7 @@ public void pop_back() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +458,7 @@ public void push_front(int new_elem) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -461,6 +480,7 @@ public void pop_front() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -483,6 +503,7 @@ public void insert(long position, int new_elem) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -504,6 +525,7 @@ public void erase(long position) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -526,6 +548,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_deque_int32_t_iterator try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -548,6 +571,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_deque_int32_t_iterator p try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_deque_int32_t_const_iterator po try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_deque_int32_t_const_iterator pos try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -616,6 +642,7 @@ public mrbind_test.mr.cs.std_deque_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -638,6 +665,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -662,6 +690,7 @@ public mrbind_test.mr.cs.std_deque_int32_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -684,6 +713,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -708,6 +738,7 @@ public mrbind_test.mr.cs.std_deque_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -730,6 +761,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -754,6 +786,7 @@ public mrbind_test.mr.cs.std_deque_int32_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -776,6 +809,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -799,6 +833,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_int32_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -822,6 +857,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_int32_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java index 77b410f3..44092888 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t_const_iterator try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java index c92b9738..56dd10a5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_deque_int32_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int32_t_iterator other try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_int32_t.H0.MR_C_std_deque_int32_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java index 23673da5..222747a8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_filesystem_path.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_filesystem_path other) try { mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public mrbind_test.mr.cs.std_string string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index 64c10005..e484ab62 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_M try { mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) try { int __ret = (int)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call.invokeExact(rawPointer(), java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret); } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_E1_from_MR_CSharp_E1.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.E1 __ret = func.call(mrbind_test.mr.csharp.E1.of(_1)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index 4da61b51..570af0ba 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayoutC(__ret, null); } catch (java.lang.Throwable __e) @@ -162,4 +168,65 @@ public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLa java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.class, "__call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.ExposedLayoutC __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutC(_1.reinterpret(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT.byteSize()), null)); + return mrbind_test.Ffi.ptrNonNull(__ret, "the callback result"); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java index 74e62668..d5dd21bc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A ot try { mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.stdfunction.A call() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stdfunction.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.stdfunction.A call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.A call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.A __ret = func.call(); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java index f4f0a418..a95277df 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_fr try { mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2 try { int __ret = (int)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_call.invokeExact(rawPointer(), _1, java.util.Objects.requireNonNull(_2, "_2").value); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.stdfunction.E.of(__ret); } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2 java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.E __ret = func.call(_1, mrbind_test.mr.stdfunction.E.of(_2)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int32_t_MR_StdFunction_E_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java index 2816e9be..30c38413 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t other) try { mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public int call() try { int __ret = (int)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public int call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int32_t.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int32_t_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int32_t of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int32_t_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int32_t.H0.MR_C_std_function_int32_t_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java index 8b2f48f5..f9d97dd2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_int32_t_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_int32_ try { mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public int call(int _1, int _2) try { int __ret = (int)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public int call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int32_t_from_int32_t_int32_t.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int32_t_from_int32_t_int32_t_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_int32_t_int32_t.H0.MR_C_std_function_int32_t_from_int32_t_int32_t_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java index 59b79e4c..8268df44 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_from_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_from_std_st try { mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public int call(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); int __ret = (int)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -162,4 +168,65 @@ public int call(java.lang.String _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int32_t_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int32_t_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int32_t_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int32_t_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int32_t_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int32_t_from_std_string.H0.MR_C_std_function_int32_t_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java index 01802e67..72dcdf3d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_ref_from_in try { mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java index db8db93d..f213a11a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_int32_t_rvalue_ref.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref try { mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public java.lang.foreign.MemorySegment call() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public java.lang.foreign.MemorySegment call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int32_t_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int32_t_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int32_t_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int32_t_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int32_t_rvalue_ref.H0.MR_C_std_function_int32_t_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java index 21c927b6..bdaeab34 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int try { mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.cs.std_string call(int _1, float _2) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, float _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, float _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int32_t_float.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, float _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int32_t_float of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int32_t_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int32_t_float_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_float.H0.MR_C_std_function_std_string_from_int32_t_float_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java index 0514d01e..d616c865 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_std_string_from_int32_t_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int try { mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.cs.std_string call(int _1, int _2) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int32_t_int32_t.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int32_t_int32_t_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int32_t_int32_t.H0.MR_C_std_function_std_string_from_int32_t_int32_t_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java index 583639ae..8c6de0c3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void other) try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,66 @@ public void call() try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java index 3523af97..0071ea5b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFun try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public void call(mrbind_test.mr.stdfunction.A _1) try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,4 +167,63 @@ public void call(mrbind_test.mr.stdfunction.A _1) java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.stdfunction.A _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.stdfunction.A(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java index d796473e..8230bbc6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_int32_t_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_int32_t_i try { mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,66 @@ public void call(int _1, int _2) try { mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_int32_t_int32_t.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1, _2); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_int32_t_int32_t_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_int32_t_int32_t.H0.MR_C_std_function_void_from_int32_t_int32_t_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java index 7bb6b3e1..521708af 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_std_strin try { mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,66 @@ public void call(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java index 61393950..bbfa5193 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainer try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -240,6 +249,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -264,6 +274,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -288,6 +299,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -312,6 +324,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -334,6 +347,7 @@ public void pop_back() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -356,6 +370,7 @@ public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -378,6 +393,7 @@ public void pop_front() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -400,6 +416,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_N try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -423,6 +440,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_No try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssign try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssigna try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -492,6 +512,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -514,6 +535,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -538,6 +560,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator begin_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -560,6 +583,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -584,6 +608,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +631,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_ try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -630,6 +656,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator end_mu try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -652,6 +679,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_ try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java index dbd2bee2..87580369 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java index fdf69831..67a27b6e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java index b6de7906..5029ac5f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t other) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -282,6 +293,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -328,6 +341,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -372,6 +387,7 @@ public void pop_back() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -394,6 +410,7 @@ public void push_front(int new_elem) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -415,6 +432,7 @@ public void pop_front() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -437,6 +455,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_int32_t_iterator p try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -459,6 +478,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_int32_t_iterator po try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -482,6 +502,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_list_int32_t_const_iterator pos try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -504,6 +525,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_list_int32_t_const_iterator posi try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -527,6 +549,7 @@ public mrbind_test.mr.cs.std_list_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -549,6 +572,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -573,6 +597,7 @@ public mrbind_test.mr.cs.std_list_int32_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -595,6 +620,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -619,6 +645,7 @@ public mrbind_test.mr.cs.std_list_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -641,6 +668,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -665,6 +693,7 @@ public mrbind_test.mr.cs.std_list_int32_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -687,6 +716,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java index c86949e9..78af5535 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t_const_iterator try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java index e64e1a55..96a1e4ac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_list_int32_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int32_t_iterator other) try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_list_int32_t.H0.MR_C_std_list_int32_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java index cc42abec..316caf47 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_f try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -406,6 +422,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -428,6 +445,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_f try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java index d1a60086..c5049742 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ public void decr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java index 083af903..8dae40fb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void decr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java index 532c3c86..3875373e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float other) try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_int32_t_float_const_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.mr.cs.std_map_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_int32_t_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java index 27d934be..98d14790 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_const_iter try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java index 86411394..8baf7ccf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int32_t_float_iterator o try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.std_map_int32_t_float.H0.MR_C_std_map_int32_t_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java index b0310ed0..45b15283 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -404,6 +420,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java index d430643b..c0e6262f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java index 83fc860e..0d8d6aa3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java index f7ad26f5..7e09762f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float other try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_int32_t_float_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator it try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_int32_t_float_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_multimap_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_int32_t_float_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java index 678c8ccb..da74ec0d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_const try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java index 01513902..3fd9ca8b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multimap_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int32_t_float_itera try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_int32_t_float.H0.MR_C_std_multimap_int32_t_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java index fd42ebc6..146ed89a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +275,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -311,6 +323,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java index ff69a03d..9efcb155 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java index d80185d4..af0326b2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float other) try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Float ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator find(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(float new_elem) try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_float_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java index 8ddef650..97bafc7a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterato try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java index d3f377c8..553a7c90 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int32_t other) try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator it try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_multiset_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_int32_t_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java index ee7901aa..58cd661c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_multiset_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int32_t_const_itera try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_int32_t.H0.MR_C_std_multiset_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java index ce408ae2..9dfd4d60 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) try { mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java index 2c061c30..d73ec4ca 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivia try { mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.NonTrivial other) try { mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.NonTrivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.NonTrivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java index cd6a0182..c1908c81 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) try { mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.SA other) try { mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.SA value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.SA value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java index 5c53b3d8..c759c355 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial o try { mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.Trivial other) try { mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.Trivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.Trivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java index 2c97f2c8..3a62455c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A ot try { mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.A other) try { mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.stdoptional.A value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.stdoptional.A value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java index 4e138404..3276872d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B ot try { mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.B other) try { mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.stdoptional.B value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.stdoptional.B value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java index 973c94d4..4e677ea0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E ot try { mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.E other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public mrbind_test.mr.stdoptional.E value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.stdoptional.E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java index dd5d3072..fe59943d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_int32_t other) try { mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(int other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int32_t.H0.MR_C_std_optional_int32_t_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java index b0a2b676..ba3496bf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_optional_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFrom.invokeExact(other, other_end); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_std_string other) try { mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other, java.lang.foreign. try { mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFrom.invokeExact(rawPointer(), other, other_end); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public mrbind_test.mr.cs.std_string value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -198,6 +205,7 @@ public mrbind_test.mr.cs.std_string value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java index a713a6bd..a4ccbb58 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_Separat try { mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.S try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(second, "second")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public mrbind_test.mr.SeparateA first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.SeparateA first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -163,6 +168,7 @@ public mrbind_test.mr.SeparateB second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -187,6 +193,7 @@ public mrbind_test.mr.SeparateB second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java index f9e4db36..2781e8ec 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.s try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -109,6 +112,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java index 2eca5db3..cfdd027f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_float.H0.MR_C_std_pair_const_int32_t_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java index bcc98d99..910895c0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_ref_const_float_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_ref_const_float_ref.H0.MR_C_std_pair_const_int32_t_ref_const_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java index 00179c46..bb834348 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java index f81cf3e1..87ecd9f5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_int32_t_float other) try { mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +116,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_float.H0.MR_C_std_pair_int32_t_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java index 70385026..b9136230 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_ref_float_ref.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -59,6 +60,7 @@ public java.lang.foreign.MemorySegment first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -82,6 +84,7 @@ public java.lang.foreign.MemorySegment second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_ref_float_ref.H0.MR_C_std_pair_int32_t_ref_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java index b6f7dec7..6902fbd4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_rvalue_ref_float_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public java.lang.foreign.MemorySegment first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public java.lang.foreign.MemorySegment second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int32_t_rvalue_ref_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java index 68d03e89..7cfb04db 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_pair_int32_t_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_int32_t_std_string othe try { mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -115,6 +118,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, java. { java.lang.foreign.MemorySegment __str_second = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(second, "second")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_Construct.invokeExact(first, __str_second, mrbind_test.Ffi.end(__str_second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public java.lang.foreign.MemorySegment first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public mrbind_test.mr.cs.std_string second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -204,6 +211,7 @@ public mrbind_test.mr.cs.std_string second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int32_t_std_string.H0.MR_C_std_pair_int32_t_std_string_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java index 00ff59bc..8d32adf3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +275,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -311,6 +323,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_c try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java index 765c72fd..48621f01 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java index 5704c190..338b722d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_float other) try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Float ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator find(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(float new_elem) try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java index 838ca0bc..2ec4fc19 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator oth try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java index 8f99f4c2..98feed7a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_int32_t other) try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_set_int32_t_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.mr.cs.std_set_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_set_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java index 8b617c6b..47b61299 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_int32_t_const_iterator o try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_set_int32_t.H0.MR_C_std_set_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java index 4d678a2a..eed523a3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_Exposed try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.csharp.ExposedLayoutSh ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -318,6 +330,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -343,6 +356,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -366,6 +380,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -388,6 +403,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java index facb8137..520b3fcb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java index 21ee446a..4f78dc96 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SE get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SE(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SE ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SE ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java index be0ebd72..73d9bd0f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SG get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SG(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void assign(mrbind_test.mr.csharp.SG ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -238,6 +247,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SG ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +301,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java index 6d7c1e54..b164cd32 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB o try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.CommonBaseAB get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructFromValu try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB construct(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.CommonBaseAB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructNonOwnin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.CommonBaseAB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java index 72405dac..5ccd29b4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructFromVa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A construct(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructNonOwn try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java index 83538f25..525b196c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.stdsharedptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -180,6 +186,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -228,6 +236,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +255,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -286,6 +297,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -363,6 +377,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -386,6 +401,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -408,6 +424,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java index 834ad452..fc76f28a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -238,6 +247,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +301,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java index 347e61db..32760b4a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_S try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructFromV try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA construct(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructNonOw try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -316,6 +328,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +381,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -392,6 +407,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -415,6 +431,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +454,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java index e67a8862..32d374d6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -316,6 +328,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +381,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -392,6 +407,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -415,6 +431,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +454,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java index 879623bd..9636c178 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.stdsharedptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -180,6 +186,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -228,6 +236,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +255,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -291,6 +302,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -341,6 +354,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -363,6 +377,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +407,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -417,6 +433,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +457,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -462,6 +480,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java index 8cadbda3..cbab05ef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -293,6 +304,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -344,6 +357,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +383,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +407,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -414,6 +430,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java index ca5a826c..ade02684 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t oth try { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t constructFromValue( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -234,6 +243,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -306,6 +318,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -328,6 +341,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t ptr) try { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -357,6 +371,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -381,6 +396,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -403,6 +419,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -425,6 +442,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int32_t.H0.MR_C_std_shared_ptr_const_int32_t_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java index 7a81ce9d..2fc82733 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_arr try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -249,6 +258,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +277,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -294,6 +305,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -313,6 +325,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -339,6 +352,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -361,6 +375,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array ptr try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -390,6 +405,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -414,6 +430,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -436,6 +453,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -458,6 +476,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array.H0.MR_C_std_shared_ptr_const_int32_t_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java index db781b35..28329ffb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_int32_t_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int32_t_arr try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -202,6 +209,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +256,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -292,6 +303,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -343,6 +356,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -367,6 +381,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -389,6 +404,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -411,6 +427,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int32_t_array_42.H0.MR_C_std_shared_ptr_const_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java index b88c77cb..62f7fd10 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -203,6 +210,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -248,6 +257,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -270,6 +280,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -299,6 +310,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -323,6 +335,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java index 347c32ab..9da50e10 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t other) try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -203,6 +210,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromValue(int val try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t construct(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t constructNonOwning(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -308,6 +320,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -354,6 +368,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -376,6 +391,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int32_t.H0.MR_C_std_shared_ptr_int32_t_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java index 4eff79a1..9c3fdb67 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array oth try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array construct(java.lang try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array constructNonOwning( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -331,6 +344,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -377,6 +392,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -399,6 +415,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int32_t_array.H0.MR_C_std_shared_ptr_int32_t_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java index fe243325..3b7b68eb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_int32_t_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -197,6 +204,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 construct(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -215,6 +223,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 constructNonOwni try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -256,6 +266,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -308,6 +320,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int32_t_array_42.H0.MR_C_std_shared_ptr_int32_t_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java index 834a4952..e1f89652 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_shared_ptr_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -203,6 +210,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -250,6 +259,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -274,6 +284,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java index 2c2e1435..f5a89865 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_string other) try { mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public java.lang.foreign.MemorySegment data_end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -245,6 +254,7 @@ public java.lang.foreign.MemorySegment data_end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java index 2ff2ebcf..38b6d2a2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_string_view.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_string_view other) try { mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -155,6 +160,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment data_end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java index 7886ba47..33b85c6e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple other) try { mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java index 8dc23517..8edc1eee 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -163,6 +168,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java index cb06928d..71b5a4f3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_ref try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java index 50d00719..2727d2f7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_rvalue_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -116,6 +119,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_rva try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java index eca41168..5fe3419c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(_0, _1, _2, _3, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _4), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _5), _6, _7, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _8), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _9)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ public int get_const_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public float get_const_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public java.lang.foreign.MemorySegment get_int32_t_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment get_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -158,6 +163,7 @@ public int get_const_int32_t_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -181,6 +187,7 @@ public float get_const_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public java.lang.foreign.MemorySegment get_int32_t_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_int32_t_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -227,6 +235,7 @@ public java.lang.foreign.MemorySegment get_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -250,6 +259,7 @@ public int get_const_int32_t_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_int32_t_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -273,6 +283,7 @@ public float get_const_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32___98db.H0.MR_C_std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t_rvalue_ref_float_rvalue_ref_const_int32_t_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java index db1d75b6..c5aeddc1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -72,6 +73,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_2, "_2")); java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _0), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _1), __str__2, mrbind_test.Ffi.end(__str__2), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public int get_const_int32_t_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int32_t_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public float get_const_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -137,6 +141,7 @@ public mrbind_test.mr.cs.std_string get_const_std_string_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -161,6 +166,7 @@ public mrbind_test.mr.cs.std_string get_const_std_string_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_re__883b.H0.MR_C_std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java index 9d7ce059..ad377cb8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_const_int32_t_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lan { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public int get_const_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_const_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -158,6 +163,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int32_t_std_string.H0.MR_C_std_tuple_const_int32_t_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java index db05e2d4..6d921ed1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_float_double_int32_t_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int32_t_i try { mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -114,6 +117,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(float _0, double try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_Construct.invokeExact(_0, _1, _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public double get_double() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_double.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, 0); } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public java.lang.foreign.MemorySegment get_double_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_double_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -225,6 +233,7 @@ public int get_int32_t_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -248,6 +257,7 @@ public java.lang.foreign.MemorySegment get_int32_t_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -271,6 +281,7 @@ public int get_int32_t_3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -294,6 +305,7 @@ public java.lang.foreign.MemorySegment get_int32_t_3_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int32_t_int32_t.H0.MR_C_std_tuple_float_double_int32_t_int32_t_get_int32_t_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java index 4cd710c2..ad61f572 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t other) try { mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +116,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_Construct.invokeExact(_0); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t.H0.MR_C_std_tuple_int32_t_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java index 30d03896..67ecfd23 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_float other) try { mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +116,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_Construct.invokeExact(_0, _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_float.H0.MR_C_std_tuple_int32_t_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java index a300b706..3a6defd7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig { java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct.invokeExact(_0, _1, mrbind_test.Ffi.ptrNonNull(_2, "_2"), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ public java.lang.foreign.MemorySegment get_int32_t_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int32_t_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public java.lang.foreign.MemorySegment get_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public mrbind_test.mr.cs.std_string get_std_string_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -136,6 +140,7 @@ public mrbind_test.mr.cs.std_string get_std_string_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java index f8b1d5ed..b91b77c3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_tuple_int32_t_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int32_t_std_string oth try { mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -115,6 +118,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lan { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public int get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -204,6 +211,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int32_t_std_string.H0.MR_C_std_tuple_int32_t_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java index 623ae858..145edfc4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(mrbind_test.mr.stduniqueptr.A other) try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public mrbind_test.mr.stduniqueptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -176,6 +182,7 @@ public mrbind_test.mr.stduniqueptr.A release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java index 8ab46d2f..86b761ad 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void assignFrom(mrbind_test.mr.stduniqueptr.A other) try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public mrbind_test.mr.stduniqueptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -177,6 +183,7 @@ public mrbind_test.mr.stduniqueptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -201,6 +208,7 @@ public mrbind_test.mr.stduniqueptr.A release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java index 18dd5bea..69aedc0b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t other) try { mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other) try { mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public java.lang.foreign.MemorySegment release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t.H0.MR_C_std_unique_ptr_int32_t_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java index 98bc2054..77b7dc7d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unique_ptr_int32_t_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int32_t_array oth try { mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other) try { mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int32_t_array.H0.MR_C_std_unique_ptr_int32_t_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java index 7134b6b1..f82d6439 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -406,6 +422,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -428,6 +445,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java index 908d1623..7f7a0983 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java index 950a30ca..f2238df6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java index 8dee022c..f79e1bfd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator find(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator find_mut(int k try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterat try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int32_t_float_const_it try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int32_t_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java index 74f6fb5b..58be3664 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_ try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java index 6d678f49..38212374 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int32_t_float_ try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_int32_t_float.H0.MR_C_std_unordered_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java index 49479696..1e8f792e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -404,6 +420,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java index 39ac422a..71f0330b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java index 591cfc58..f7672c58 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java index 7821141e..f5000177 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_f try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator fin try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator find_mut( try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator beg try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_c try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator begin_mut try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_i try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator end try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_con try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int32_t_float_ite try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java index d68fb380..c86f645f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_f try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java index ee798622..8ae0fc30 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multimap_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int32_t_f try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_int32_t_float.H0.MR_C_std_unordered_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java index b32f158c..da707bac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -242,6 +251,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -288,6 +299,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java index b0324811..484b26bc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java index 83000d6f..759f9b7b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t o try { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator find(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_i try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_int32_t_const_ite try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java index 77cb209e..c678416d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_multiset_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int32_t_c try { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multiset_int32_t.H0.MR_C_std_unordered_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java index c7b0a441..7f807dbe 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -242,6 +251,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -288,6 +299,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java index 3e69169c..80193b0e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java index 9b350887..bfd810d1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t other) try { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_set_int32_t_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java index 78bd5c59..2905708e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_unordered_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int32_t_const_ try { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_set_int32_t.H0.MR_C_std_unordered_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java index b53db503..5088ec4d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float other) try { mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructAs_int32_t.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -158,6 +163,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void AssignAs_int32_t(int value) try { mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +228,7 @@ public java.lang.Integer get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float.H0.MR_C_std_variant_int32_t_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java index b2154844..e6fb33ea 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_float try { mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_int32_t.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public static mrbind_test.mr.cs.std_variant_int32_t_float_float constructAs_floa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_float_1.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -171,6 +177,7 @@ public static mrbind_test.mr.cs.std_variant_int32_t_float_float constructAs_floa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -190,6 +197,7 @@ public void AssignAs_int32_t(int value) try { mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -211,6 +219,7 @@ public void AssignAs_float_1(float value) try { mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_float_1.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -232,6 +241,7 @@ public void AssignAs_float_2(float value) try { mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -254,6 +264,7 @@ public java.lang.Integer get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -277,6 +288,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -300,6 +312,7 @@ public java.lang.Float get_float_1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -323,6 +336,7 @@ public java.lang.foreign.MemorySegment get_float_1_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_1_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.Float get_float_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.foreign.MemorySegment get_float_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_float.H0.MR_C_std_variant_int32_t_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java index 27f19a45..73382a3b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_int32_t_float_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int32_t_float_std_st try { mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_int32_t.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -158,6 +163,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -183,6 +189,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_std_string(jav { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_ConstructAs_std_string.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void AssignAs_int32_t(int value) try { mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_int32_t.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -223,6 +231,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -246,6 +255,7 @@ public void AssignAs_std_string(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_AssignAs_std_string.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -268,6 +278,7 @@ public java.lang.Integer get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -291,6 +302,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -337,6 +350,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -384,6 +399,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int32_t_float_std_string.H0.MR_C_std_variant_int32_t_float_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java index 9afda7e0..e8e70c50 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float.java @@ -33,6 +33,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float defaultC try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -80,6 +82,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_ try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -102,6 +105,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -125,6 +129,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float construc try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -149,6 +154,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_int32_t.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -172,6 +178,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -191,6 +198,7 @@ public void AssignAs_std_monostate() try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -213,6 +221,7 @@ public void AssignAs_int32_t(int value) try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -234,6 +243,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -256,6 +266,7 @@ public boolean get_std_monostate() try { boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -279,6 +290,7 @@ public java.lang.Integer get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -302,6 +314,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -325,6 +338,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -348,6 +362,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float.H0.MR_C_std_variant_std_monostate_int32_t_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java index 708d9b76..68f50265 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_variant_std_monostate_int32_t_float_float.java @@ -33,6 +33,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float de try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -80,6 +82,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int32_ try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -102,6 +105,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -125,6 +129,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -149,6 +154,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int32_t(int va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_int32_t.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -167,6 +173,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -185,6 +192,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_ConstructAs_float_3.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -204,6 +212,7 @@ public void AssignAs_std_monostate() try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +235,7 @@ public void AssignAs_int32_t(int value) try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_int32_t.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +257,7 @@ public void AssignAs_float_2(float value) try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -268,6 +279,7 @@ public void AssignAs_float_3(float value) try { mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_AssignAs_float_3.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +302,7 @@ public boolean get_std_monostate() try { boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -313,6 +326,7 @@ public java.lang.Integer get_int32_t() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -336,6 +350,7 @@ public java.lang.foreign.MemorySegment get_int32_t_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_int32_t_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -359,6 +374,7 @@ public java.lang.Float get_float_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -382,6 +398,7 @@ public java.lang.foreign.MemorySegment get_float_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -405,6 +422,7 @@ public java.lang.Float get_float_3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -428,6 +446,7 @@ public java.lang.foreign.MemorySegment get_float_3_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int32_t_float_float.H0.MR_C_std_variant_std_monostate_int32_t_float_float_get_float_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java index 194d3e16..38686116 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.A value) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public mrbind_test.mr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -304,6 +316,7 @@ public mrbind_test.mr.A at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -328,6 +341,7 @@ public mrbind_test.mr.A front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -352,6 +366,7 @@ public mrbind_test.mr.A front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -376,6 +391,7 @@ public mrbind_test.mr.A back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -400,6 +416,7 @@ public mrbind_test.mr.A back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -424,6 +441,7 @@ public void push_back(mrbind_test.mr.A new_elem) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -468,6 +487,7 @@ public void insert(long position, mrbind_test.mr.A new_elem) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -490,6 +510,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -512,6 +533,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator po try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -535,6 +557,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator pos try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -558,6 +581,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator posi try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -581,6 +605,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator posit try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +629,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -626,6 +652,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -650,6 +677,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -672,6 +700,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -696,6 +725,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -718,6 +748,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -742,6 +773,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -764,6 +796,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -787,6 +820,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -810,6 +844,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java index 35b47fb0..409b31fe 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator o try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.A deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java index 5b8e6b39..65ea4c1d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.A deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java index 9ffda99c..24645982 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A val try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +339,7 @@ public java.lang.foreign.MemorySegment front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -349,6 +363,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -372,6 +387,7 @@ public java.lang.foreign.MemorySegment back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -395,6 +411,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -418,6 +435,7 @@ public void push_back(mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +458,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -462,6 +481,7 @@ public void insert(long position, mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -484,6 +504,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -506,6 +527,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_ try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +551,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_i try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +575,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_it try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -575,6 +599,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_ite try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -598,6 +623,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -620,6 +646,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +671,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -666,6 +694,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator it try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +719,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -712,6 +742,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +767,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -758,6 +790,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -781,6 +814,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -804,6 +838,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java index f1c34b65..36ffd607 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java index 8178c424..329a8858 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_itera try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java index 0127f6eb..551e1968 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange.invokeExact(mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public void assignFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -221,6 +229,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.Expos try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -264,6 +274,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -307,6 +319,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -329,6 +342,7 @@ public mrbind_test.mr.csharp.ExposedLayout at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -353,6 +367,7 @@ public mrbind_test.mr.csharp.ExposedLayout at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -377,6 +392,7 @@ public mrbind_test.mr.csharp.ExposedLayout front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -401,6 +417,7 @@ public mrbind_test.mr.csharp.ExposedLayout front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -425,6 +442,7 @@ public mrbind_test.mr.csharp.ExposedLayout back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -449,6 +467,7 @@ public mrbind_test.mr.csharp.ExposedLayout back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -473,6 +492,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -496,6 +516,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -519,6 +540,7 @@ public void push_back(mrbind_test.mr.csharp.ExposedLayout new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -541,6 +563,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -563,6 +586,7 @@ public void insert(long position, mrbind_test.mr.csharp.ExposedLayout new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -585,6 +609,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -607,6 +632,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_Expose try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -630,6 +656,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_Exposed try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -653,6 +680,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_ try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -676,6 +704,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_c try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -699,6 +728,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator begin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_con try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -745,6 +776,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -767,6 +799,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_ite try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -791,6 +824,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -813,6 +847,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -837,6 +872,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -859,6 +895,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -882,6 +919,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_ try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -905,6 +943,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterat try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java index 44433f7c..2269bec7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.csharp.ExposedLayout deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java index 0a46b200..6ee3b0fe 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.ExposedLayout deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java index 78ed9eed..3ea3f795 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateA va try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.SeparateA at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.SeparateA at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.SeparateA front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.SeparateA front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.SeparateA back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.SeparateA back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.SeparateA new_elem) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.SeparateA new_elem) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_ite try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iter try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_itera try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterat try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator it try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { long __ret = (long)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java index 14749229..f3e0e19c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_it try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.SeparateA deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java index 4a417afc..e2fb2091 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateA deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.A.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java index 33d851e2..521fcf50 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateB va try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.SeparateB at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.SeparateB at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.SeparateB front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.SeparateB front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.SeparateB back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.SeparateB back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.SeparateB new_elem) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.SeparateB new_elem) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_ite try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iter try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_itera try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterat try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator it try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { long __ret = (long)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java index c262d11d..c282b0cb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_it try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java index 0ec757cc..3e87393f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.B.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java index 18ec7487..3c5de01f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +200,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -215,6 +223,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -236,6 +245,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -282,6 +293,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -306,6 +318,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -330,6 +343,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -354,6 +368,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -378,6 +393,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -402,6 +418,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -424,6 +441,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterato try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -468,6 +487,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -492,6 +512,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator begi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -514,6 +535,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -538,6 +560,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterato try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -560,6 +583,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -584,6 +608,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator end_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +631,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -652,6 +679,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java index 67b60de7..c97bba96 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java index b29f422c..4f48ab3f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java index df40cfb2..a3d8d80c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainer try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonDefaultConstructible new_e try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.stdcontainers.NonDefaultConstru try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_ try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefa try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefau try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefault try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefault try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCon try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCon try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java index 8b6d8009..f3f4e76e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java index ac41c031..d483470d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java index 80c537a1..60eadc8a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A val try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +339,7 @@ public java.lang.foreign.MemorySegment front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -349,6 +363,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -372,6 +387,7 @@ public java.lang.foreign.MemorySegment back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -395,6 +411,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -418,6 +435,7 @@ public void push_back(mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +458,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -462,6 +481,7 @@ public void insert(long position, mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -484,6 +504,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -506,6 +527,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_ try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +551,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +575,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_co try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -575,6 +599,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_con try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -598,6 +623,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -620,6 +646,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +671,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -666,6 +694,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +719,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -712,6 +742,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_i try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +767,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -758,6 +790,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -781,6 +814,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_it try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -804,6 +838,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java index b5728307..9e3ec838 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java index 5aa66f10..3da632ea 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java index 66d211f1..7e1e966e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_ try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.cs.expected_ try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -304,6 +316,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -328,6 +341,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -352,6 +366,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -376,6 +391,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -400,6 +416,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -424,6 +441,7 @@ public void push_back(mrbind_test.mr.cs.expected_int32_t_std_string new_elem) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -468,6 +487,7 @@ public void insert(long position, mrbind_test.mr.cs.expected_int32_t_std_string try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -490,6 +510,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -512,6 +533,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_expected_int32_t try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -535,6 +557,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_ try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -558,6 +581,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_str try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -581,6 +605,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_expected_int32_t_std_stri try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +629,7 @@ public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -626,6 +652,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -650,6 +677,7 @@ public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator begin_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -672,6 +700,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -696,6 +725,7 @@ public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -718,6 +748,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_c try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -742,6 +773,7 @@ public mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator end_mut try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -764,6 +796,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_i try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -787,6 +820,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_co try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -810,6 +844,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_expected_int32_t_std_string_it try { long __ret = (long)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java index 83aeb511..27b90c2d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_ try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java index df6d45dd..36c19a03 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_expected_int32_t_std_string_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_expected_int32_t_std_ try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.expected_int32_t_std_string deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_expected_int32_t_std_string.H0.MR_C_std_vector_expected_int32_t_std_string_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java index 3f62e7b7..8dd732f2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t other) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -528,6 +550,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +573,7 @@ public void insert(long position, int new_elem) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int32_t_iterator try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -615,6 +641,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int32_t_iterator try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -638,6 +665,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_int32_t_const_iterator p try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -660,6 +688,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_int32_t_const_iterator po try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -683,6 +712,7 @@ public mrbind_test.mr.cs.std_vector_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -705,6 +735,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -729,6 +760,7 @@ public mrbind_test.mr.cs.std_vector_int32_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -751,6 +783,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -775,6 +808,7 @@ public mrbind_test.mr.cs.std_vector_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -797,6 +831,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -821,6 +856,7 @@ public mrbind_test.mr.cs.std_vector_int32_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int32_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -843,6 +879,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -866,6 +903,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int32_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -889,6 +927,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int32_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java index c287a1d8..9d52f94a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t_const_iterato try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java index b93fbf1d..f151d4a6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int32_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int32_t_iterator othe try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int32_t.H0.MR_C_std_vector_int32_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java index f919110b..2c760966 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Long ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, long value) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public long at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Long front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Long back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void push_back(long new_elem) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -528,6 +550,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +573,7 @@ public void insert(long position, long new_elem) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -615,6 +641,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -638,6 +665,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator p try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -660,6 +688,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator po try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -683,6 +712,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -705,6 +735,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -729,6 +760,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -751,6 +783,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -775,6 +808,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -797,6 +831,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -821,6 +856,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -843,6 +879,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -866,6 +903,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -889,6 +927,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java index ac401e7e..d5a18581 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterato try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public long deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java index c44aa941..2bbaa8e6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator othe try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java index eea77f4b..76765f9f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_pair_ try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_e try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_Sep try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_Sepa try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_Separ try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_ try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Se try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Se try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Sepa try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Sepa try { boolean __ret = (boolean)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Separ try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Separ try { long __ret = (long)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java index 03bd84d1..2e185217 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java index 21443de0..1affd2e0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java index 2307be69..a10fb415 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Long ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, long value) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public long at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Long front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Long back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void push_back(long new_elem) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -528,6 +550,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +573,7 @@ public void insert(long position, long new_elem) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterato try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -615,6 +641,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -638,6 +665,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -660,6 +688,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator p try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -683,6 +712,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -705,6 +735,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -729,6 +760,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -751,6 +783,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -775,6 +808,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -797,6 +831,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -821,6 +856,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -843,6 +879,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -866,6 +903,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -889,6 +927,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java index 661defbf..f3d4ca88 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterat try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public long deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java index 73cd8bc8..fe879d25 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator oth try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java index 727cbe82..6114e161 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/A.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public mrbind_test.mr.csharp.A assignFromAnother(mrbind_test.mr.csharp.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -117,6 +120,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -138,6 +142,7 @@ public void bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -159,6 +164,7 @@ public static void static_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public static void static_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +200,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,6 +222,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -235,6 +244,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java index 07a137bb..792e508f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/AmbiguousTemplates.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.AmbiguousTemplates assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.AmbiguousTemplates(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void template_a(int _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void template_a(float _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public int template_b_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public float template_b_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void template_c_int32_t() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void template_c_float() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void instantiate() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_instantiate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java index 4a0fa1c5..146c55be 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public int ia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public static long iaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -172,6 +178,7 @@ public java.lang.foreign.MemorySegment iaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -194,6 +201,7 @@ public static long iaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -213,6 +221,7 @@ public int ci() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -236,6 +245,7 @@ public int cia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -258,6 +268,7 @@ public static long ciaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -277,6 +288,7 @@ public java.lang.foreign.MemorySegment ciaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -299,6 +311,7 @@ public static long ciaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -318,6 +331,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -343,6 +357,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -365,6 +380,7 @@ public mrbind_test.mr.cs.std_string sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -388,6 +404,7 @@ public static long saSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -408,6 +425,7 @@ public mrbind_test.mr.cs.std_string cs() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -432,6 +450,7 @@ public mrbind_test.mr.cs.std_string csa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -455,6 +474,7 @@ public static long csaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java index 1389e0ad..04a4ca94 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/B.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int a, int b) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Construct.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.B(__ret, false, __owner); } @@ -124,4 +128,64 @@ public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_B_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java index 99345e51..aac29211 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/C.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.C(__ret, false, __owner); } @@ -101,4 +104,44 @@ public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_C_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.C dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java index 906ddba0..655ed1b7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/CallOp.java @@ -17,7 +17,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.CallOp assignFromAnother(mrbind_test.mr.csharp.Call try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.CallOp(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void call_0() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_call_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public int call_3(int _1, int _2, int _3) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_CallOp_call_3.invokeExact(rawPointer(), _1, _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java index 7aa25fe8..d64099a9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,7 +70,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo { try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,7 +89,8 @@ public static java.lang.foreign.MemorySegment sa() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -124,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -143,6 +148,7 @@ public static void setSb(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +185,7 @@ public static boolean sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) @@ -197,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -265,6 +276,7 @@ public void setB(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -287,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +323,7 @@ public boolean d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java index 3908e24d..12a9c63c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -96,6 +98,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public static void setSa(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -136,6 +140,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public static void setSb(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public static mrbind_test.mr.csharp.A sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -195,6 +202,7 @@ public static mrbind_test.mr.csharp.A sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -215,6 +223,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -238,6 +247,7 @@ public void setA(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void setB(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -307,6 +319,7 @@ public mrbind_test.mr.csharp.A c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.csharp.A d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java index ab22a094..c497434f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -95,6 +97,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +181,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -194,6 +201,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -214,6 +222,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void setA(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -260,6 +270,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -283,6 +294,7 @@ public void setB(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -306,6 +318,7 @@ public mrbind_test.mr.csharp.ExposedLayout c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -330,6 +343,7 @@ public mrbind_test.mr.csharp.ExposedLayout d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java index 371acc5f..191b5b42 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, d)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -124,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -143,6 +148,7 @@ public static void setSb(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +185,7 @@ public static short sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -197,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -265,6 +276,7 @@ public void setB(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -287,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +323,7 @@ public short d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java index 9314e05a..264f6048 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java @@ -36,6 +36,7 @@ public void foo(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -57,6 +58,7 @@ public void foo(float _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -78,6 +80,7 @@ public void foo_mut_char(byte _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -99,6 +102,7 @@ public void foo_char(byte _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -120,6 +124,7 @@ public int opPos_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -142,6 +147,7 @@ public int opPos_const_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -165,6 +171,7 @@ public void opCompl_ref() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +193,7 @@ public void opCompl_const_ref() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -207,6 +215,7 @@ public int opDiv_ref_int32_t(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -229,6 +238,7 @@ public int opDiv_const_ref_int32_t(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java index 0964e46f..939291ac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtor.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_int32_t(int _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_int32_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_int32_t(int _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int32_t.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -137,6 +141,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_int16_t(short try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int16_t.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -160,6 +165,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_float(float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -183,6 +189,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_float(float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public mrbind_test.mr.csharp.ConvCtor assignFromAnother(mrbind_test.mr.csharp.Co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtor(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java index b65cebe5..d557d73e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ConvCtorCopyButNoMove assignFromAnother(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorCopyButNoMove(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java index c7ccbd7e..634606c7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorExposed.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorExposed_Construct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java index 692b6556..a773de34 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.ConvCtorNonTrivial assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java index ef295dcd..6a486e80 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted assignFromAnother(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java index d3800440..310545d4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorTrivial.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.ConvCtorTrivial assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java index 08c38364..b7177555 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.Intege try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Construct.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.ConvCtorWithDefArg assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorWithDefArg(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java index 4091347e..f56da9da 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOp.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public int convertTo_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public float convertTo_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ConvOp assignFromAnother(mrbind_test.mr.csharp.Conv try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvOp(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java index a3582600..e9b6a8da 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ConvOpToRef.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public int convertTo_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public java.lang.foreign.MemorySegment convertTo_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment convertTo_uint16_t_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_uint16_t_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.csharp.ConvOpToRef assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvOpToRef(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java index ac0228af..6be932e9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/D.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.D assignFromAnother(mrbind_test.mr.csharp.D _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.D(__ret, false, __owner); } @@ -113,6 +116,7 @@ public void d1() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void d2() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java index e39d8ef6..bb4e4e83 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/E.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.csharp.E assignFromAnother(mrbind_test.mr.csharp.E _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.E(__ret, false, __owner); } @@ -114,6 +117,7 @@ public void e1() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public void e2() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java index 99b0c276..e17eb02a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityA assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityA(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(int _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public boolean opNotEqual(int _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityA_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public boolean opEqual(mrbind_test.mr.csharp.EqualityA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java index 78f44b7e..3eff7f62 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityB assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opEqual(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int opNotEqual(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityB_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int opEqual(mrbind_test.mr.csharp.EqualityB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java index 5baf4031..98de25fd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityC assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityC(__ret, false, __owner); } @@ -110,6 +113,7 @@ public void opEqual(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void opNotEqual(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityC_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void opEqual(mrbind_test.mr.csharp.EqualityC _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java index cc0e5ffe..92fab9fa 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityD assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityD(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(java.lang.Integer _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityD_const_int32_t_ptr.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java index 71c9a91a..e7fc2ecf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/EqualityE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityE assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityE(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(mrbind_test.mr.csharp.EqualityD _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java index 0b8f1c8b..28a1d42c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayout.java @@ -59,6 +59,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -80,6 +81,7 @@ public void bar() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +103,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -119,6 +122,7 @@ public void opIncr() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +144,7 @@ public int opAdd_ref_int32_t(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayout_ref_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -164,6 +169,7 @@ public mrbind_test.mr.csharp.ExposedLayout opMul(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayout_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -187,6 +193,7 @@ public mrbind_test.mr.csharp.ExposedLayout opAdd_const_ref_int32_t(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_const_MR_CSharp_ExposedLayout_ref_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -210,6 +217,7 @@ public boolean opLess(mrbind_test.mr.csharp.ExposedLayout _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -233,6 +241,7 @@ public boolean opEqual(float _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayout_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -255,6 +264,7 @@ public boolean opLess(byte _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java index 9ff0610e..cc266874 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2(int _1, int _2 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_2.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java index c45a729c..2fa8e9bd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -59,6 +59,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -80,6 +81,7 @@ public void bar() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +103,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -119,6 +122,7 @@ public void opIncr() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +144,7 @@ public int opAdd(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayoutSh_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -162,6 +167,7 @@ public int opMul(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayoutSh_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -184,6 +190,7 @@ public boolean opLess(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +214,7 @@ public boolean opEqual(float _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -229,6 +237,7 @@ public boolean opLess(byte _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayoutSh_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -252,6 +261,7 @@ public boolean opEqual(mrbind_test.mr.csharp.ExposedLayout _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -276,6 +286,7 @@ public boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java index 6b1de988..ab45c862 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/F.java @@ -20,7 +20,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,7 +91,8 @@ public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.F(__ret, false, __owner); } @@ -103,4 +106,144 @@ public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromE(mrbind_test.mr.csharp.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java index f8d831c4..1ba1bc16 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.csharp; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static int test_int(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -52,6 +54,7 @@ public static boolean test_bool(boolean a, java.lang.Boolean b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void test_bool_ref(java.lang.foreign.MemorySegment a, java.lang.fo try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -87,6 +91,7 @@ public static int test_bool_ref2(java.lang.foreign.MemorySegment a, java.lang.fo try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -105,6 +110,7 @@ public static java.lang.foreign.MemorySegment get_bool_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_get_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -123,6 +129,7 @@ public static void print_bool_ref() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_print_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +147,7 @@ public static boolean test_bool_cref(boolean _1, java.lang.Boolean _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _1), (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _2))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) @@ -158,6 +166,7 @@ public static java.lang.foreign.MemorySegment test_int_ref(java.lang.foreign.Mem try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +185,7 @@ public static int test_int_cref(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -194,6 +204,7 @@ public static java.lang.foreign.MemorySegment test_int_rref(java.lang.foreign.Me try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -212,6 +223,7 @@ public static int test_int_crref(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -230,6 +242,7 @@ public static java.lang.foreign.MemorySegment test_int_ptr(java.lang.foreign.Mem try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -248,6 +261,7 @@ public static java.lang.Integer test_int_cptr(java.lang.Integer a, java.lang.Int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -266,6 +280,7 @@ public static short test_ushort(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { short __ret = (short)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -284,6 +299,7 @@ public static java.lang.foreign.MemorySegment test_ushort_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -302,6 +318,7 @@ public static short test_ushort_cref(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -320,6 +337,7 @@ public static java.lang.foreign.MemorySegment test_ushort_rref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +356,7 @@ public static short test_ushort_crref(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -356,6 +375,7 @@ public static java.lang.foreign.MemorySegment test_ushort_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -374,6 +394,7 @@ public static java.lang.Short test_ushort_cptr(java.lang.Short a, java.lang.Shor try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Short)__ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -392,6 +413,7 @@ public static int test_constness_int(int _1, java.lang.Integer _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_int.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -412,6 +434,7 @@ public static mrbind_test.mr.cs.std_string test_constness_str(java.lang.String _ java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, _2); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_str.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1), __str__2, mrbind_test.Ffi.end(__str__2)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +460,7 @@ public static void test_keyword_in_param_name(int params) try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_keyword_in_param_name.invokeExact(params); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +478,7 @@ public static mrbind_test.mr.csharp.E1 test_enum(mrbind_test.mr.csharp.E1 a, mrb try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E1.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret); } catch (java.lang.Throwable __e) @@ -472,6 +497,7 @@ public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E1(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -490,6 +516,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_cref(mrbind_test.mr.csharp.E1 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -508,6 +535,7 @@ public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E1(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -526,6 +554,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_crref(mrbind_test.mr.csharp.E1 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -544,6 +573,7 @@ public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E1_ptr(jav try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -562,6 +592,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_cptr(mrbind_test.mr.csharp.E1 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -580,6 +611,7 @@ public static mrbind_test.mr.csharp.E2 test_enum(mrbind_test.mr.csharp.E2 a, mrb try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E2.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret); } catch (java.lang.Throwable __e) @@ -598,6 +630,7 @@ public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E2(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -616,6 +649,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_cref(mrbind_test.mr.csharp.E2 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -634,6 +668,7 @@ public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E2(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -652,6 +687,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_crref(mrbind_test.mr.csharp.E2 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -670,6 +706,7 @@ public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E2_ptr(jav try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -688,6 +725,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_cptr(mrbind_test.mr.csharp.E2 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -706,6 +744,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.Trivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -729,6 +768,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_ref(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -753,6 +793,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_cref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -777,6 +818,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_rref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -801,6 +843,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_crref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -825,6 +868,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_ptr(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -849,6 +893,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_cptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -873,6 +918,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.NonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -896,6 +942,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ref(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -920,6 +967,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -944,6 +992,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_rref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -968,6 +1017,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_crref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -992,6 +1042,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ptr(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -1016,6 +1067,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cptr(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -1040,6 +1092,7 @@ public static java.lang.foreign.MemorySegment test_void_ptr(java.lang.foreign.Me try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1058,6 +1111,7 @@ public static java.lang.foreign.MemorySegment test_void_cptr(java.lang.foreign.M try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1076,6 +1130,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE mark_se_as_shared() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_se_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1095,6 +1150,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1118,6 +1174,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1142,6 +1199,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1166,6 +1224,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_rref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1190,6 +1249,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_crref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1214,6 +1274,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ptr(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1237,6 +1298,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cptr(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1260,6 +1322,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1283,6 +1346,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1307,6 +1371,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1331,6 +1396,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_rr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1355,6 +1421,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1379,6 +1446,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_pt try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1402,6 +1470,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1425,6 +1494,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG mark_sg_as_shared() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_sg_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1445,6 +1515,7 @@ public static mrbind_test.mr.cs.std_string test_string(java.lang.String a, java. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1463,6 +1534,7 @@ public static mrbind_test.mr.cs.std_string test_string_ref(mrbind_test.mr.cs.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1489,6 +1561,7 @@ public static mrbind_test.mr.cs.std_string test_string_cref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1510,6 +1583,7 @@ public static mrbind_test.mr.cs.std_string test_string_rref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1531,6 +1605,7 @@ public static mrbind_test.mr.cs.std_string test_string_crref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1550,6 +1625,7 @@ public static mrbind_test.mr.cs.std_string test_string_ptr(mrbind_test.mr.cs.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1573,6 +1649,7 @@ public static mrbind_test.mr.cs.std_string test_string_cptr(mrbind_test.mr.cs.st try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1598,6 +1675,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview(java.lang.String java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1616,6 +1694,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1642,6 +1721,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_cref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1663,6 +1743,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_rref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1684,6 +1765,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_crref(java.lang. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1703,6 +1785,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_ptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1726,6 +1809,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_cptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1751,6 +1835,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath(java.lang.String java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1769,6 +1854,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1795,6 +1881,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1816,6 +1903,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_rref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1837,6 +1925,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_crref(java.lang. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1856,6 +1945,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1879,6 +1969,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1902,6 +1993,7 @@ public static int opIncr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1924,6 +2016,7 @@ public static int opPostIncr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1946,6 +2039,7 @@ public static int opDecr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1968,6 +2062,7 @@ public static int opPostDecr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1990,6 +2085,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsA _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsA_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2012,6 +2108,7 @@ public static void opAdd(mrbind_test.mr.csharp.StaticOpsLhsB _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsB_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2033,6 +2130,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsC _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsC_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_1, "_1").release(), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2055,6 +2153,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsD _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsD_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2077,6 +2176,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsE _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsE_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2099,6 +2199,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsF _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsF_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2121,6 +2222,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsG _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsG_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2143,6 +2245,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsH _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsH_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2165,6 +2268,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsA _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsA.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2187,6 +2291,7 @@ public static void opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsB _2) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsB.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2208,6 +2313,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsC _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsC.invokeExact(_1, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_2, "_2").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2230,6 +2336,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsD _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsD.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2252,6 +2359,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsE _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsE.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2274,6 +2382,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsF _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsF.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2296,6 +2405,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsG _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsG.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2318,6 +2428,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsH _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_StaticOpsRhsH.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2341,6 +2452,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsEnum _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsEnum_int32_t.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2360,6 +2472,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsMixedLhs _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2383,6 +2496,7 @@ public static int opAdd(mrbind_test.mr.csharp.NonTrivialClassOps _1, float _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonTrivialClassOps_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2405,6 +2519,7 @@ public static int opAdd(float _1, mrbind_test.mr.csharp.NonTrivialClassOps _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_float_MR_CSharp_NonTrivialClassOps.invokeExact(_1, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2427,6 +2542,7 @@ public static int opAdd(mrbind_test.mr.csharp.NonCopyableClassByValueOps _1, int try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2449,6 +2565,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.NonCopyableClassByValueOps try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int32_t_MR_CSharp_NonCopyableClassByValueOps.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2471,6 +2588,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2494,6 +2612,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ref(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2518,6 +2637,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cref( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2542,6 +2662,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ptr(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2566,6 +2687,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cptr( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2590,6 +2712,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2613,6 +2736,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2637,6 +2761,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2661,6 +2786,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2685,6 +2811,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2709,6 +2836,7 @@ public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2731,6 +2859,7 @@ public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2753,6 +2882,7 @@ public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int32_t_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2775,6 +2905,7 @@ public static void opDecr(mrbind_test.mr.csharp.ExposedLayout _1) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2796,6 +2927,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayout.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayout(__ret, null); } catch (java.lang.Throwable __e) @@ -2819,6 +2951,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ref(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2843,6 +2976,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2867,6 +3001,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_rref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2891,6 +3026,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_crref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2915,6 +3051,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ptr(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2939,6 +3076,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2964,6 +3102,7 @@ public static mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout test_exposed_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_vec.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2984,6 +3123,7 @@ public static mrbind_test.mr.csharp.NonTrivial asave_ref_in_exposed_layout(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_asave_ref_in_exposed_layout.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -3007,6 +3147,7 @@ public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3029,6 +3170,7 @@ public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3051,6 +3193,7 @@ public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int32_t_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3073,6 +3216,7 @@ public static void opDecr(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -3094,6 +3238,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh make_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_make_exposed_sh.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3112,6 +3257,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret, null); } catch (java.lang.Throwable __e) @@ -3135,6 +3281,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3159,6 +3306,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cref(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3183,6 +3331,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3207,6 +3356,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cptr(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3232,6 +3382,7 @@ public static boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutB _1, mrbind_te try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_C_equal_MR_CSharp_ExposedLayoutB.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3255,6 +3406,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t test_optint(int a, mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3278,6 +3430,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t test_optint_ref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); } @@ -3302,6 +3455,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t test_optint_cref(int a, mrb try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); } @@ -3325,6 +3479,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t test_optint_ptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); } @@ -3349,6 +3504,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t test_optint_cptr(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int32_t(__ret, false, __owner); } @@ -3373,6 +3529,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3396,6 +3553,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ref(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3420,6 +3578,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cref(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cref.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3443,6 +3602,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ptr(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3467,6 +3627,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cptr(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3491,6 +3652,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3515,6 +3677,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ref( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3539,6 +3702,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cref try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3563,6 +3727,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ptr( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3587,6 +3752,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3611,6 +3777,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3635,6 +3802,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3659,6 +3827,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cref.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3683,6 +3852,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3707,6 +3877,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3731,6 +3902,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3755,6 +3927,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3779,6 +3952,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3803,6 +3977,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3827,6 +4002,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3851,6 +4027,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3875,6 +4052,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3899,6 +4077,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cref(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3923,6 +4102,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ptr(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3947,6 +4127,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3972,6 +4153,7 @@ public static void test_tag() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -3989,6 +4171,7 @@ public static void test_tag_cref() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cref.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -4006,6 +4189,7 @@ public static boolean test_tag_ptr() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_ptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4024,6 +4208,7 @@ public static boolean test_tag_cptr() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4042,6 +4227,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_var try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4065,6 +4251,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_var try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); } @@ -4089,6 +4276,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_var try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); } @@ -4113,6 +4301,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_var try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); } @@ -4136,6 +4325,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float test_var try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, false, __owner); } @@ -4160,6 +4350,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_with_repeated_types.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4179,6 +4370,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_ref(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4202,6 +4394,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_ptr(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4225,6 +4418,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_cref(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4248,6 +4442,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_cptr(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4271,6 +4466,7 @@ public static java.lang.foreign.MemorySegment test_uniqueptr(java.lang.foreign.M try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4289,6 +4485,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_ref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ref.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4307,6 +4504,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_cref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, false, __owner); } @@ -4331,6 +4529,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_ptr(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ptr.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release(), c); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4349,6 +4548,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int32_t test_uniqueptr_cptr(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_unique_ptr_int32_t(__ret, false, __owner); } @@ -4373,6 +4573,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_ref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4391,6 +4592,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_cref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4409,6 +4611,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_rref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4427,6 +4630,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_crref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4445,6 +4649,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_ptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4463,6 +4668,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_cptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4481,6 +4687,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_ref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4499,6 +4706,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_cref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4517,6 +4725,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_rref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4535,6 +4744,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_crref(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4553,6 +4763,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_ptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4571,6 +4782,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_cptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4589,6 +4801,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_ref(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4607,6 +4820,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_cref(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4625,6 +4839,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_ptr(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4643,6 +4858,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_cptr(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4661,6 +4877,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_ref(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4679,6 +4896,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_cref(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4697,6 +4915,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_ptr(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4715,6 +4934,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_cptr(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4734,6 +4954,7 @@ public static java.lang.foreign.MemorySegment test_ptrs1(java.lang.foreign.Memor try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs1.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4752,6 +4973,7 @@ public static java.lang.foreign.MemorySegment test_ptrs2(java.lang.foreign.Memor try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs2.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4770,6 +4992,7 @@ public static java.lang.foreign.MemorySegment test_intptr_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4788,6 +5011,7 @@ public static java.lang.foreign.MemorySegment test_intptr_cref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4806,6 +5030,7 @@ public static java.lang.foreign.MemorySegment test_intptr_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4824,6 +5049,7 @@ public static java.lang.foreign.MemorySegment test_intptr_cptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4842,6 +5068,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4860,6 +5087,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4878,6 +5106,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4896,6 +5125,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4914,6 +5144,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_ref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4932,6 +5163,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_cref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4950,6 +5182,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_ptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4968,6 +5201,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_cptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4986,6 +5220,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5004,6 +5239,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5022,6 +5258,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5040,6 +5277,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5058,6 +5296,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_ref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5076,6 +5315,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_cref(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5094,6 +5334,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_ptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5112,6 +5353,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_cptr(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5130,6 +5372,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5148,6 +5391,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_cref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5166,6 +5410,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5184,6 +5429,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_cptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5202,6 +5448,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5220,6 +5467,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5238,6 +5486,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5256,6 +5505,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5274,6 +5524,7 @@ public static void nameConflicts() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflicts.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5291,6 +5542,7 @@ public static void nameConflictsExposed() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflictsExposed.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5309,6 +5561,7 @@ public static void template_a(int _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_int32_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5327,6 +5580,7 @@ public static void template_a(float _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5344,6 +5598,7 @@ public static int template_b_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_int32_t.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5362,6 +5617,7 @@ public static float template_b_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5380,6 +5636,7 @@ public static void template_c_int32_t() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_int32_t.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5397,6 +5654,7 @@ public static void template_c_float() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_float.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5414,6 +5672,7 @@ public static void instantiate() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_instantiate.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5431,6 +5690,7 @@ public static int opNeg_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csha try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5453,6 +5713,7 @@ public static int opNeg_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.m try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5476,6 +5737,7 @@ public static void opNot_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csh try { mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5497,6 +5759,7 @@ public static void opNot_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test. try { mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5518,6 +5781,7 @@ public static int opBitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref(int _1, try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int32_t_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5540,6 +5804,7 @@ public static int opBitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref(in try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int32_t_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5564,6 +5829,7 @@ public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5588,6 +5854,7 @@ public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5612,6 +5879,7 @@ public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5637,6 +5905,7 @@ public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5661,6 +5930,7 @@ public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5685,6 +5955,7 @@ public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_MR_CSharp_LifetimesC.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5709,6 +5980,7 @@ public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableD self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5732,6 +6004,7 @@ public static java.lang.Integer end(mrbind_test.mr.csharp.IterableD self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5755,6 +6028,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.csharp.Iterab try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5778,6 +6052,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.csharp.Iterable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5801,6 +6076,7 @@ public static java.lang.Integer begin_const_MR_CSharp_IterableF_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5824,6 +6100,7 @@ public static java.lang.Integer end_const_MR_CSharp_IterableF_ref(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5847,6 +6124,7 @@ public static java.lang.foreign.MemorySegment begin_MR_CSharp_IterableF_ref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5870,6 +6148,7 @@ public static java.lang.foreign.MemorySegment end_MR_CSharp_IterableF_ref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5893,6 +6172,7 @@ public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableL_int32_t se try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5916,6 +6196,7 @@ public static java.lang.Integer end(mrbind_test.mr.csharp.IterableL_int32_t self try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5940,6 +6221,7 @@ public static mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr test_vec_of_mut_ptr_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_mut_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5958,6 +6240,7 @@ public static mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr test_vec_of_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_const_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5977,6 +6260,7 @@ public static mrbind_test.mr.cs.std_tuple get_tuple0() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple0.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5995,6 +6279,7 @@ public static mrbind_test.mr.cs.std_tuple_int32_t get_tuple1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple1.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6013,6 +6298,7 @@ public static mrbind_test.mr.cs.std_tuple_int32_t_std_string get_tuple2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int32_t_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6031,6 +6317,7 @@ public static mrbind_test.mr.cs.std_pair_int32_t_std_string get_pair2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_pair2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int32_t_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6049,6 +6336,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int32_t_std_string get_tuple_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_const.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int32_t_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6067,6 +6355,7 @@ public static mrbind_test.mr.cs.std_tuple_int32_t_ref_float_rvalue_ref_std_strin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_refs.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int32_t_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6085,6 +6374,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_r try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_crefs.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int32_t_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6103,6 +6393,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CShar try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_value.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6121,6 +6412,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_C try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_lvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6139,6 +6431,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_rvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6157,6 +6450,7 @@ public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6180,6 +6474,7 @@ public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_ref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); } @@ -6204,6 +6499,7 @@ public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_cref(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); } @@ -6228,6 +6524,7 @@ public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_ptr(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); } @@ -6252,6 +6549,7 @@ public static mrbind_test.mr.cs.expected_int32_t_float test_expected_int_cptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_int32_t_float(__ret, false, __owner); } @@ -6276,6 +6574,7 @@ public static mrbind_test.mr.cs.expected_void_float test_expected_void(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_void_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6299,6 +6598,7 @@ public static mrbind_test.mr.cs.expected_void_float test_expected_void_ref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); } @@ -6323,6 +6623,7 @@ public static mrbind_test.mr.cs.expected_void_float test_expected_void_cref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); } @@ -6347,6 +6648,7 @@ public static mrbind_test.mr.cs.expected_void_float test_expected_void_ptr(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); } @@ -6371,6 +6673,7 @@ public static mrbind_test.mr.cs.expected_void_float test_expected_void_cptr(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_void_float(__ret, false, __owner); } @@ -6395,6 +6698,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6418,6 +6722,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_r try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6442,6 +6747,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6466,6 +6772,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6490,6 +6797,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_E1_float test_expected_enum_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6514,6 +6822,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6537,6 +6846,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6561,6 +6871,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6585,6 +6896,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6609,6 +6921,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float test_expected_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6633,6 +6946,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expecte try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6656,6 +6970,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expecte try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6680,6 +6995,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expecte try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6704,6 +7020,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expecte try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6728,6 +7045,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float test_expecte try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6752,6 +7070,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6775,6 +7094,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6799,6 +7119,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6823,6 +7144,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6847,6 +7169,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_SA_float test_expected_shared try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6871,6 +7194,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6894,6 +7218,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6918,6 +7243,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6942,6 +7268,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6966,6 +7293,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float test_expe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6990,6 +7318,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -7013,6 +7342,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7037,6 +7367,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7061,6 +7392,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7085,6 +7417,7 @@ public static mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float test_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java index 31c004cf..d7988522 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/G.java @@ -44,7 +44,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,7 +69,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,7 +93,8 @@ public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.G(__ret, false, __owner); } @@ -105,4 +108,124 @@ public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java index fb59f58d..ccc9dfd1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrA assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrA opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrA opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrA opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrA opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java index 481d85d5..9fac5969 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IncrDecrB assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public mrbind_test.mr.csharp.IncrDecrB opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -133,6 +137,7 @@ public mrbind_test.mr.csharp.IncrDecrB opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.csharp.IncrDecrB opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -178,6 +184,7 @@ public mrbind_test.mr.csharp.IncrDecrB opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java index 04381a7c..222695d9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrC.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrC assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrC opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrC opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrC opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrC opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java index 0c342127..12a31479 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrD.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrD assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrD opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrD opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrD opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrD opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java index 5bf4f92e..fab05d1a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrE opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrE opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrE opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrE opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java index 0656b24b..550cf599 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrF opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrF opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrF opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrF opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java index 0dbcefea..ad9c1ba9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrG opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrG opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrG opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrG opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java index 6bcf3bf8..9bab68a8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrH.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrH opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrH opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrH opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrH opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java index 6aa6c10e..c9f2631b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IncrDecrI.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IncrDecrI assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrI(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java index 2efe8b0c..dbf1a14e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.csharp.IndexerA assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment index(int i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java index 9b54a2fc..4961db4e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.IndexerB assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerB(__ret, false, __owner); } @@ -137,6 +141,7 @@ public mrbind_test.mr.csharp.IndexerA index_1(int i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_1.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -160,6 +165,7 @@ public mrbind_test.mr.csharp.IndexerA index_2(int i, int j) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_2.invokeExact(rawPointer(), i, j); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -183,6 +189,7 @@ public mrbind_test.mr.csharp.IndexerA index_0() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -207,6 +214,7 @@ public mrbind_test.mr.csharp.IndexerA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -231,6 +239,7 @@ public void setA(mrbind_test.mr.csharp.IndexerA value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java index ad8df4b1..5ae4eaea 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IndexerC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IndexerC assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerC(__ret, false, __owner); } @@ -109,6 +112,7 @@ public int index_mut(int i) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public float index(int i) try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java index 865a3e71..93c81c41 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableA assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableA(__ret, false, __owner); } @@ -111,6 +114,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java index 1c9eb078..022234c0 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableB assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableB(__ret, false, __owner); } @@ -111,6 +114,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java index 5566f89e..0f621259 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableC assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableC(__ret, false, __owner); } @@ -111,6 +114,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -203,6 +210,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -225,6 +233,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java index a4b5795f..c0f3717f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableD assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableD(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java index 54727fbe..500f3a32 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableE assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableE(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java index 1d209312..38e8a875 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableF assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableF(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java index 6bd97eae..33035fe4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableG assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableG(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.cs.std_string begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_string end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.cs.std_string arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -182,6 +188,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java index bc3998df..0d5f4b09 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableH.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); } @@ -112,6 +115,7 @@ public mrbind_test.mr.cs.std_string begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -136,6 +140,7 @@ public mrbind_test.mr.cs.std_string end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -160,6 +165,7 @@ public mrbind_test.mr.cs.std_string arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -183,6 +189,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java index f098e14f..53f7df7d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableI.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.ExposedLayout begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.csharp.ExposedLayout end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -182,6 +188,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java index 4ac383fd..89182e3a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableJ.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableJ assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableJ(__ret, false, __owner); } @@ -112,6 +115,7 @@ public mrbind_test.mr.csharp.ExposedLayout begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -136,6 +140,7 @@ public mrbind_test.mr.csharp.ExposedLayout end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -160,6 +165,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -183,6 +189,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java index fe4ddb7a..3a5ca50b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableK assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK(__ret, false, __owner); } @@ -112,6 +115,7 @@ public mrbind_test.mr.csharp.IterableK_Iter begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IterableK_Iter(__ret, true, null); } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.csharp.IterableK_Sentinel end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, true, null); } catch (java.lang.Throwable __e) @@ -157,7 +162,8 @@ public int arr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -179,7 +185,8 @@ public static long arrSize() { try { - long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java index e3c4456c..1edfe37b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -15,7 +15,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -37,7 +37,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,7 +62,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,7 +111,8 @@ public mrbind_test.mr.csharp.IterableK_Iter assignFromAnother(mrbind_test.mr.csh { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK_Iter(__ret, false, __owner); } @@ -133,7 +137,8 @@ public int opMul() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,7 +160,8 @@ public void opIncr() { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H4.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,7 +182,8 @@ public boolean opEqual(mrbind_test.mr.csharp.IterableK_Sentinel s) { try { - boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,7 +207,8 @@ public java.lang.foreign.MemorySegment ptr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -223,7 +231,8 @@ public void setPtr(java.lang.foreign.MemorySegment value) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java index 4510a1f2..bc28814d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -37,7 +37,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,7 +62,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.IterableK_Sentinel assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, false, __owner); } @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void setPtr(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java index d8ddda94..586f7c2d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/IterableL_int32_t.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableL_int32_t assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableL_int32_t(__ret, false, __owner); } @@ -111,6 +114,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int32_t_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java index f09dba23..2dba0060 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.csharp.LifetimesA assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -136,6 +140,7 @@ public java.lang.foreign.MemorySegment foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -159,6 +164,7 @@ public void bar(java.lang.foreign.MemorySegment ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_bar.invokeExact(rawPointer(), ref); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -181,6 +187,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java index b1a5c4a3..68ec1fb4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.LifetimesB assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesB(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.csharp.LifetimesA begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -163,6 +168,7 @@ public mrbind_test.mr.csharp.LifetimesA end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -187,6 +193,7 @@ public mrbind_test.mr.csharp.LifetimesA opMul() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_LifetimesB_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -211,6 +218,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -235,6 +243,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java index 3d0aad96..cac6fc8d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.LifetimesC assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesC(__ret, false, __owner); } @@ -138,6 +142,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -162,6 +167,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java index 655c49af..5125b7e6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_2.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -98,6 +100,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_Life try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -128,6 +131,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_Life try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +155,7 @@ public mrbind_test.mr.csharp.LifetimesD assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesD(__ret, false, __owner); } @@ -176,6 +181,7 @@ public mrbind_test.mr.csharp.LifetimesA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -200,7 +206,8 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); - java.lang.Object __owner = this; + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -225,6 +232,7 @@ public static mrbind_test.mr.csharp.LifetimesA return_ref_static(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref_static.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -249,6 +257,7 @@ public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -272,6 +281,7 @@ public void store_ref_in_param(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -296,6 +306,7 @@ public void store_this_in_param(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_this_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -319,6 +330,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -343,6 +355,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java index a2562095..d0e24f9a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/LifetimesE.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.csharp.LifetimesE assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesE(__ret, false, __owner); } @@ -116,6 +119,7 @@ public mrbind_test.mr.csharp.LifetimesA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -140,7 +144,8 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); - java.lang.Object __owner = this; + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -165,6 +170,7 @@ public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -188,6 +194,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -212,6 +219,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java index e27caee0..7414156f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int name_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFrom.invokeExact(name_conflicts, mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public mrbind_test.mr.csharp.NameConflicts assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts(__ret, false, __owner); } @@ -139,6 +143,7 @@ public void name_Conflicts() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_name_Conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +166,7 @@ public int name_conflicts() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -184,6 +190,7 @@ public void setName_conflicts(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -206,6 +213,7 @@ public mrbind_test.mr.csharp.NameConflicts_A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); } @@ -230,6 +238,7 @@ public void setA(mrbind_test.mr.csharp.NameConflicts_A value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java index 9101fee3..ed36e0b6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflictsExposed.java @@ -39,6 +39,7 @@ public void name_Conflicts_exposed() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflictsExposed_name_Conflicts_exposed.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java index 55f6ac0c..5509b45d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NameConflicts_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NameConflicts_A assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java index 1c853993..0a0ec816 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.NonCopyableClassByValueOps assignFromAnother(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonCopyableClassByValueOps(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java index 625b75e9..5386faed 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java index fc5cdb89..f9c852dc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialClassOps.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.NonTrivialClassOps assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivialClassOps(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opAdd(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_add_MR_CSharp_NonTrivialClassOps_int32_t.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java index 484ff171..e39518cb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/NonTrivialDerived.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NonTrivialDerived assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivialDerived(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java index 0ad391df..7a71aae8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.Outer assignFromAnother(mrbind_test.mr.csharp.Outer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Outer(__ret, false, __owner); } @@ -110,6 +113,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java index 357fc310..dbe7d65e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Outer_Inner.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.Outer_Inner assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Outer_Inner(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void bar() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java index 96429cf4..f2e53f39 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalA assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalA(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java index 0d33f09a..766167ac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalB assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java index b1e3f4a8..885fd8ae 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalC assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalC(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java index 92abdcb6..43a4ebbe 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalD assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalD(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java index d3c0bff1..76d9d05c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalE assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalE(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opLess(mrbind_test.mr.csharp.RelationalC _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public int opGreater(mrbind_test.mr.csharp.RelationalC _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java index faeb0cc5..6f03c8fa 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/RelationalF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); } @@ -110,6 +113,7 @@ public void opLess(mrbind_test.mr.csharp.RelationalC _1) try { mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void opGreater(mrbind_test.mr.csharp.RelationalC _1) try { mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -154,6 +159,7 @@ public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) try { mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java index 56e6972d..82a0df95 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SA.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java index ae901a59..b445e828 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SB.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.SB assignFromAnother(mrbind_test.mr.csharp.SB _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SB(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -165,6 +170,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java index 5ef2d25e..62d01479 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SC.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SC(__ret, false, __owner); } @@ -102,4 +105,84 @@ public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::SA`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA()`. */ + public mrbind_test.mr.csharp.SA upcastToSA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SA(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SA`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSA(mrbind_test.mr.csharp.SA object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SB`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB()`. */ + public mrbind_test.mr.csharp.SB upcastToSB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SB`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSB(mrbind_test.mr.csharp.SB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java index 8d663345..cc09fc32 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SD.java @@ -18,7 +18,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.SD assignFromAnother(mrbind_test.mr.csharp.SD _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SD(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java index 54dcc8fc..a7236f82 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SE.java @@ -18,7 +18,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -40,7 +40,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,7 +66,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,7 +91,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,7 +115,8 @@ public mrbind_test.mr.csharp.SE assignFromAnother(mrbind_test.mr.csharp.SE _othe { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SE(__ret, false, __owner); } @@ -138,7 +142,8 @@ public mrbind_test.mr.cs.std_string s() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -164,7 +169,8 @@ public void setS(java.lang.String value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java index 4997ce50..4c0ed396 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SF.java @@ -19,7 +19,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -41,7 +41,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,7 +66,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,7 +90,8 @@ public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _othe { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SF(__ret, false, __owner); } @@ -102,4 +105,104 @@ public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CSharp::SD`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD()`. */ + public mrbind_test.mr.csharp.SD upcastToSD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SD(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SD`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::SD`. Returns null if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF dynamicDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SE`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE()`. */ + public mrbind_test.mr.csharp.SE upcastToSE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SE(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SE`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSE(mrbind_test.mr.csharp.SE object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java index 9f3a8c56..32b23914 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/SG.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SG_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SG_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java index 0172dd4d..f5d03e8b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsA.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,7 +63,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ public mrbind_test.mr.csharp.StaticOpsLhsA assignFromAnother(mrbind_test.mr.csha { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java index 7d226444..253abbaf 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsB.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,7 +63,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ public mrbind_test.mr.csharp.StaticOpsLhsB assignFromAnother(mrbind_test.mr.csha { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java index 11b48c00..7f451251 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java index 540e79c6..9c934217 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java index 0add2da7..f3ddc8ec 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsE assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsE(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java index 938e41e1..45f47587 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsF assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsF(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java index 9fbfe7e5..74aa8cfd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsG assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsG(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java index f00d2f79..bae8e89f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsLhsH.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsH assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsH(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java index 0fb4e8d5..946f2c50 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.StaticOpsMixedLhs assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsMixedLhs(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java index 1aa7230a..caa136c8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.StaticOpsMixedRhs assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsMixedRhs(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java index df37f16b..59723c0f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsA assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java index a96e7825..ea551ffc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsB assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java index ab1ad306..3a75ea52 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java index e155b6a1..bbd7bae6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java index a9a4fce8..6d4cb4de 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsE assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsE(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java index b00f0824..19f33761 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsF assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsF(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java index d7fd6a81..aa25f431 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsG assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsG(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java index 0279feb6..403c3c8a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StaticOpsRhsH.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsH assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsH(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java index bd088d9b..376149c4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvFsPath.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -84,6 +86,7 @@ public mrbind_test.mr.cs.std_filesystem_path convertTo_std_filesystem_path() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public mrbind_test.mr.csharp.StringConvFsPath assignFromAnother(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvFsPath(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java index 59a73abb..f2cc1155 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvString.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.cs.std_string convertTo_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConvertTo_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.StringConvString assignFromAnother(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvString(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java index 3a3ed2f2..c8b66d87 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/StringConvStringView.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.cs.std_string_view convertTo_std_string_view() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConvertTo_std_string_view.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.StringConvStringView assignFromAnother(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvStringView(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java index 0d4675cc..3524556c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestConstness.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.TestConstness assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestConstness(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void foo_mut() try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java index b71ea577..b08ae071 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestFields.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -77,6 +78,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int i, int c java.lang.foreign.MemorySegment __str_const_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s, "const_s")); java.lang.foreign.MemorySegment __str_const_s_ref = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s_ref, "const_s_ref")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFrom.invokeExact(i, const_i, i_ref, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, const_i_ref), __str_s, mrbind_test.Ffi.end(__str_s), __str_const_s, mrbind_test.Ffi.end(__str_const_s), mrbind_test.Ffi.ptrNonNull(s_ref, "s_ref"), __str_const_s_ref, mrbind_test.Ffi.end(__str_const_s_ref)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -99,6 +101,7 @@ public static int static_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -118,6 +121,7 @@ public static void setStatic_i(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public static int static_const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public static java.lang.foreign.MemorySegment static_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -171,6 +177,7 @@ public static int static_const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -189,6 +196,7 @@ public static mrbind_test.mr.cs.std_string static_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -210,6 +218,7 @@ public static void setStatic_s(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -227,6 +236,7 @@ public static mrbind_test.mr.cs.std_string static_const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -246,6 +256,7 @@ public static mrbind_test.mr.cs.std_string static_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -265,6 +276,7 @@ public static mrbind_test.mr.cs.std_string static_const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -286,6 +298,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -310,6 +323,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -332,6 +346,7 @@ public int const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -355,6 +370,7 @@ public java.lang.foreign.MemorySegment i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -378,6 +394,7 @@ public int const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -401,6 +418,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -426,6 +444,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -448,6 +467,7 @@ public mrbind_test.mr.cs.std_string const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -472,6 +492,7 @@ public mrbind_test.mr.cs.std_string s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -496,6 +517,7 @@ public mrbind_test.mr.cs.std_string const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java index b54a4d36..59c97c52 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public int assignFromAnother(mrbind_test.mr.csharp.TestOpsA _other) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public int opAdd() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public int opAdd(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public int opSub() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public int opSub(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public int opMul(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public int opDiv(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public int opMod(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +277,7 @@ public int opXor(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public int opBitand() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public int opBitand(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -335,6 +348,7 @@ public int opBitor(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -380,6 +395,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public int add_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -425,6 +442,7 @@ public int sub_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -448,6 +466,7 @@ public int mul_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -471,6 +490,7 @@ public int div_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -494,6 +514,7 @@ public int mod_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -517,6 +538,7 @@ public int xor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -540,6 +562,7 @@ public int bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -563,6 +586,7 @@ public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -586,6 +610,7 @@ public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -609,6 +634,7 @@ public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -632,6 +658,7 @@ public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -655,6 +682,7 @@ public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -678,6 +706,7 @@ public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -701,6 +730,7 @@ public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -724,6 +754,7 @@ public int opOr(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -747,6 +778,7 @@ public int opComma(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -770,6 +802,7 @@ public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -793,6 +826,7 @@ public int arrow() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -815,6 +849,7 @@ public int call(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -838,6 +873,7 @@ public int index(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java index f124dd0b..cdef7695 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsB.java @@ -15,7 +15,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public int opAdd() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public int opSub() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public int opSub(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public int opMul(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public int opMod(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +277,7 @@ public int opXor(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public int opBitand() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -335,6 +348,7 @@ public int opBitor(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -380,6 +395,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public int add_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -425,6 +442,7 @@ public int sub_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -448,6 +466,7 @@ public int mul_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -471,6 +490,7 @@ public int div_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -494,6 +514,7 @@ public int mod_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -517,6 +538,7 @@ public int xor_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -540,6 +562,7 @@ public int bitand_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -563,6 +586,7 @@ public int bitor_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -586,6 +610,7 @@ public int opLshift(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -609,6 +634,7 @@ public int opRshift(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -632,6 +658,7 @@ public int lshift_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -655,6 +682,7 @@ public int rshift_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -677,7 +705,8 @@ public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -700,7 +729,8 @@ public int opAnd(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -723,7 +753,8 @@ public int opOr(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -746,7 +777,8 @@ public int opComma(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -769,7 +801,8 @@ public int arrow_star(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -792,7 +825,8 @@ public int arrow() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -814,7 +848,8 @@ public int call(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -837,7 +872,8 @@ public int index(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java index e8bb8dc8..05c366e7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestOpsC.java @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,7 +62,8 @@ public mrbind_test.mr.csharp.TestOpsC assignFromAnother(mrbind_test.mr.csharp.Te { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestOpsC(__ret, false, __owner); } @@ -85,7 +87,8 @@ public void opAdd() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -106,7 +109,8 @@ public void opAdd(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -128,7 +132,8 @@ public void opSub() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -149,7 +154,8 @@ public void opSub(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -171,7 +177,8 @@ public void opMul() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -192,7 +199,8 @@ public void opMul(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,7 +222,8 @@ public void opDiv(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -236,7 +245,8 @@ public void opMod(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,7 +268,8 @@ public void opXor(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,7 +291,8 @@ public void opBitand() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,7 +313,8 @@ public void opBitand(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,7 +336,8 @@ public void opBitor(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -345,7 +359,8 @@ public void opCompl() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -366,7 +381,8 @@ public void opNot() { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -387,7 +403,8 @@ public void assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -409,7 +426,8 @@ public void add_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -432,6 +450,7 @@ public void sub_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +473,7 @@ public void mul_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -476,6 +496,7 @@ public void div_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -498,6 +519,7 @@ public void mod_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -520,6 +542,7 @@ public void xor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -542,6 +565,7 @@ public void bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -564,6 +588,7 @@ public void bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -586,6 +611,7 @@ public void opLshift(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -608,6 +634,7 @@ public void opRshift(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -630,6 +657,7 @@ public void lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -652,6 +680,7 @@ public void rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -674,6 +703,7 @@ public void opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -696,6 +726,7 @@ public void opAnd(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -718,6 +749,7 @@ public void opOr(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -740,6 +772,7 @@ public void opComma(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -762,6 +795,7 @@ public void arrow_star(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -784,6 +818,7 @@ public void arrow() try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -805,6 +840,7 @@ public void call(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -827,6 +863,7 @@ public void index(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java index 057a23cd..fc1b6d82 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFrom.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f1, "f1"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f2, "f2"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f3, "f3"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f4, "f4"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f5, "f5"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f6, "f6"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f7, "f7")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -103,6 +105,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -126,6 +129,7 @@ public mrbind_test.mr.csharp.TestStdFunction assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestStdFunction(__ret, false, __owner); } @@ -150,6 +154,7 @@ public void Call() try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +177,7 @@ public mrbind_test.mr.cs.std_function_int32_t_from_std_string f1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int32_t_from_std_string(__ret, false, __owner); } @@ -196,6 +202,7 @@ public void setF1(mrbind_test.mr.cs.std_function_int32_t_from_std_string value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -219,6 +226,7 @@ public mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t f2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t(__ret, false, __owner); } @@ -243,6 +251,7 @@ public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int32_t_int32_t try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +275,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); } @@ -290,6 +300,7 @@ public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +324,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_Ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); } @@ -337,6 +349,7 @@ public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_M try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -360,6 +373,7 @@ public mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalu try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_int32_t_rvalue_ref(__ret, false, __owner); } @@ -384,6 +398,7 @@ public void setF5(mrbind_test.mr.cs.std_function_int32_t_ref_from_int32_t_ref_in try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -407,6 +422,7 @@ public mrbind_test.mr.cs.std_function_int32_t_rvalue_ref f6() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int32_t_rvalue_ref(__ret, false, __owner); } @@ -431,6 +447,7 @@ public void setF6(mrbind_test.mr.cs.std_function_int32_t_rvalue_ref value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +471,7 @@ public mrbind_test.mr.cs.std_function_void f7() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); } @@ -478,6 +496,7 @@ public void setF7(mrbind_test.mr.cs.std_function_void value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java index 4d8aa3b6..ea9816a3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/Trivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Tri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java index 15667fd0..1c79ab13 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/csharp/TrivialDerived.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.TrivialDerived assignFromAnother(mrbind_test.mr.csh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TrivialDerived(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java index af4d7b2a..e4e6f70c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Af.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.customprefnames.Af assignFromAnother(mrbind_test.mr.custom try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.customprefnames.Af(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java index b278ab52..91936354 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Ai.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.customprefnames.Ai assignFromAnother(mrbind_test.mr.custom try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.customprefnames.Ai(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java index 51b63a01..441125ac 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/customprefnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.customprefnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java index 590b87e3..d00a457b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A.java @@ -36,6 +36,7 @@ public mrbind_test.mr.declorder.A_B c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_c.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.A_B(__ret, null); } catch (java.lang.Throwable __e) @@ -58,6 +59,7 @@ public mrbind_test.mr.declorder.A_E d() try { int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.declorder.A_E.of(__ret); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java index aedf4a22..b2de2931 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/A_B.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_a.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.A(__ret, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ public mrbind_test.mr.declorder.A_E b() try { int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.declorder.A_E.of(__ret); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java index 332fe584..be0112cc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_false.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.C_true blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_false_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.C_true(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java index 32f17bea..fdc25e1a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/declorder/C_true.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.C_false blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_true_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.C_false(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java index a3e23774..c5841177 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/deprecation/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.deprecation; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void bar() try { mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_bar.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java index 5c898331..98f62931 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java index c06e887e..22998e45 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.includesforenumconstants; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConsta try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants.H0.MR_IncludesForEnumConstants_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java index 64159806..df7dfe44 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.incompletearrayelemtype; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void bar(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_arrays_of_incomplete_types_2.H0.MR_IncompleteArrayElemType_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void foo(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_arrays_of_incomplete_types.H0.MR_IncompleteArrayElemType_foo.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java index f2202f59..b9a9e4d7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.iostream.A assignFromAnother(mrbind_test.mr.iostream.A _ot try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.iostream.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java index 5e65e057..c9f2e647 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/iostream/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.iostream; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void opLshift(mrbind_test.mr.cs.std_ostream _1, mrbind_test.mr.ios try { mrbind_test.ffi.MR.test_iostream.H0.MR_C_print_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -38,6 +39,7 @@ public static void opRshift(mrbind_test.mr.cs.std_istream _1, mrbind_test.mr.ios try { mrbind_test.ffi.MR.test_iostream.H0.MR_C_input_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java index b75d1808..38fc53a9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.lifetimeinference.A assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.A(__ret, false, __owner); } @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -203,6 +210,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java index 31c4487f..4f1de6fd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.lifetimeinference.B assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.B(__ret, false, __owner); } @@ -134,6 +138,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java index bc33fc14..8607e848 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.lifetimeinference.C assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.C(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java index 015a9991..5ec0fc2f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.lifetimeinference; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinfer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -40,6 +41,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinferen try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +65,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinfer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +89,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinferen try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java index b6a0e2ff..1020acb2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/A.java @@ -65,6 +65,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -85,6 +86,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java index 984fe8fe..80f56061 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/B.java @@ -48,6 +48,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_B_DefaultConstruct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java index 2f538576..c23bb2ae 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/matchinglayout/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.matchinglayout; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.matchinglayout.B foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_foo.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.matchinglayout.B(__ret, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.matchinglayout.B _1) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void baz(mrbind_test.mr.matchinglayout.B _1) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_baz.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.matchinglayout.B bleh(mrbind_test.mr.matchinglayout try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bleh.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.matchinglayout.B(__ret.reinterpret(mrbind_test.mr.matchinglayout.B.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java index 4facb3df..ef18a896 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/membervars/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ public static int z() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -80,6 +82,7 @@ public static void setZ(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +100,7 @@ public static int w() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -116,6 +120,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -139,6 +144,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +167,7 @@ public int y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -185,6 +192,7 @@ public java.lang.foreign.MemorySegment ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -209,6 +217,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -231,6 +240,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java index 1c1b2d3f..cbe04c9e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.nestedtemplateinst.A_int32_t assignFromAnother(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtemplateinst.A_int32_t(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java index 994ae19f..09857441 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtemplateinst/A_int32_t_AA_float.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float assignFromAnother(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int32_t_AA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtemplateinst.A_int32_t_AA_float(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java index ed188cce..51db6dd5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b"), java.util.Objects.requireNonNull(e, "e").value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public mrbind_test.mr.nestedtypes.A assignFromAnother(mrbind_test.mr.nestedtypes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.nestedtypes.A_B b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); } @@ -163,6 +168,7 @@ public void setB(mrbind_test.mr.nestedtypes.A_B value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +192,7 @@ public mrbind_test.mr.nestedtypes.A_E e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -209,6 +216,7 @@ public void setE(mrbind_test.mr.nestedtypes.A_E value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java index 0daf7010..4253b30d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/nestedtypes/A_B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.nestedtypes.A_B assignFromAnother(mrbind_test.mr.nestedtyp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java index 0e2c9e45..83f8e16d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.omittingtargsandquals.A_float assignFromAnother(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.omittingtargsandquals.A_float(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void opAdd() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java index 97a21727..1236b99a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/A_int32_t.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.omittingtargsandquals.A_int32_t assignFromAnother(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.omittingtargsandquals.A_int32_t(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void opAdd() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void opSub(mrbind_test.mr.omittingtargsandquals.A_float _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_sub_MR_OmittingTargsAndQuals_A_int32_t_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java index c40dc7ba..9714dd73 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.omittingtargsandquals; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void a(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void b(mrbind_test.mr.omittingtargsandquals.A_int32_t _1, mrbind_t try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_b.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -59,6 +61,7 @@ public static void a(mrbind_test.mr.omittingtargsandquals.A_float _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -80,6 +83,7 @@ public static void opMul(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_deref_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +105,7 @@ public static void opCompl(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_compl_MR_OmittingTargsAndQuals_A_int32_t.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -122,6 +127,7 @@ public static void c(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_c.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -143,6 +149,7 @@ public static void d(mrbind_test.mr.omittingtargsandquals.A_int32_t _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_d.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -164,6 +171,7 @@ public static void inst() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_inst.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java index bb6e1211..19cc7e33 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/A.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public int assignFromAnother(mrbind_test.mr.overloadedops.A _other) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public int opAdd() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public int opAdd(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -136,6 +140,7 @@ public int opSub() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -159,6 +164,7 @@ public int opSub(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -184,6 +190,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +214,7 @@ public int opMul(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -231,6 +239,7 @@ public int opDiv(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -255,6 +264,7 @@ public int opMod(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -279,6 +289,7 @@ public int opXor(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -303,6 +314,7 @@ public int opBitand(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -327,6 +339,7 @@ public int opBitor(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -351,6 +364,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -374,6 +388,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -397,6 +412,7 @@ public int opLess(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -421,6 +437,7 @@ public int opGreater(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -445,6 +462,7 @@ public int add_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -469,6 +487,7 @@ public int sub_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -493,6 +512,7 @@ public int mul_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -517,6 +537,7 @@ public int div_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -541,6 +562,7 @@ public int mod_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -565,6 +587,7 @@ public int xor_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -589,6 +612,7 @@ public int bitand_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -613,6 +637,7 @@ public int bitor_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -637,6 +662,7 @@ public int opLshift(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -661,6 +687,7 @@ public int opRshift(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -685,6 +712,7 @@ public int lshift_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -709,6 +737,7 @@ public int rshift_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -733,6 +762,7 @@ public int opEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -757,6 +787,7 @@ public int opNotEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -781,6 +812,7 @@ public int opLessEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -805,6 +837,7 @@ public int opGreaterEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -829,6 +862,7 @@ public int opCompareThreeWay(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -853,6 +887,7 @@ public int opAnd(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -877,6 +912,7 @@ public int opOr(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -901,6 +937,7 @@ public int opIncr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -924,6 +961,7 @@ public int opPostIncr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -947,6 +985,7 @@ public int opDecr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -970,6 +1009,7 @@ public int opPostDecr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -993,6 +1033,7 @@ public int opComma(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1017,6 +1058,7 @@ public int arrow_star(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1041,6 +1083,7 @@ public int arrow() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1064,6 +1107,7 @@ public int call(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1088,6 +1132,7 @@ public int index(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java index 9bc5b847..1561199c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/B.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.overloadedops.B assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java index ef8a98ab..8aa8c8e3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.overloadedops.C assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.C(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java index ef371406..9287c7ea 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/D.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.overloadedops.D assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.D(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int opDeref_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public int opDeref_const_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_const_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java index f97f866a..82c943c5 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloadedops/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloadedops; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static int opAdd(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -40,6 +41,7 @@ public static int opAdd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +66,7 @@ public static int opSub(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +90,7 @@ public static int opSub(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +116,7 @@ public static int opMul(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +140,7 @@ public static int opMul(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -159,6 +165,7 @@ public static int opDiv(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -183,6 +190,7 @@ public static int opMod(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +215,7 @@ public static int opXor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -231,6 +240,7 @@ public static int opBitand(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -255,6 +265,7 @@ public static int opBitor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -279,6 +290,7 @@ public static int opCompl(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -302,6 +314,7 @@ public static int opNot(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -327,6 +340,7 @@ public static int opLess(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overl try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public static int opGreater(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ov try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -375,6 +390,7 @@ public static int opAddAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -399,6 +415,7 @@ public static int opSubAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -423,6 +440,7 @@ public static int opMulAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -447,6 +465,7 @@ public static int opDivAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -471,6 +490,7 @@ public static int opModAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -495,6 +515,7 @@ public static int opXorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -519,6 +540,7 @@ public static int opBitandAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -543,6 +565,7 @@ public static int opBitorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.m try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -567,6 +590,7 @@ public static int opLshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -591,6 +615,7 @@ public static int opRshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -615,6 +640,7 @@ public static int opLshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -639,6 +665,7 @@ public static int opRshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -663,6 +690,7 @@ public static int opEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -687,6 +715,7 @@ public static int opNotEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.o try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -711,6 +740,7 @@ public static int opLessEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -735,6 +765,7 @@ public static int opGreaterEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -759,6 +790,7 @@ public static int opCompareThreeWay(mrbind_test.mr.overloadedops.B _1, mrbind_te try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -783,6 +815,7 @@ public static int opAnd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -807,6 +840,7 @@ public static int opOr(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloa try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -831,6 +865,7 @@ public static int opIncr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -854,6 +889,7 @@ public static int opPostIncr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -877,6 +913,7 @@ public static int opDecr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -900,6 +937,7 @@ public static int opPostDecr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -923,6 +961,7 @@ public static int opComma(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -947,6 +986,7 @@ public static int opArrowStar(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_arrow_star_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -971,6 +1011,7 @@ public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overl try { mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -994,6 +1035,7 @@ public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overl try { mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -1016,6 +1058,7 @@ public static int opPos_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1 try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1038,6 +1081,7 @@ public static int opPos_const_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedop try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_const_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java index 4d5fc48d..4866ada3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/overloads/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloads; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void a(int _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_1.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void a(int _1, int _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_2.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -50,6 +52,7 @@ public static void b_int32_t() try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_int32_t.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -67,6 +70,7 @@ public static void b_float() try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -84,6 +88,7 @@ public static void c(int _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_int32_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +106,7 @@ public static void c(float _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +124,7 @@ public static void d(byte _1, int _2, byte _3) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_int32_t.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +142,7 @@ public static void d(byte _1, float _2, byte _3) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_float.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +160,7 @@ public static void e(int _1, java.lang.foreign.MemorySegment _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_const_int32_t_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -169,6 +178,7 @@ public static void e_int32_t_rvalue_ref_int32_t(java.lang.foreign.MemorySegment try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int32_t_rvalue_ref_int32_t.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +196,7 @@ public static void e_int32_t_rvalue_ref_float(java.lang.foreign.MemorySegment _1 try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int32_t_rvalue_ref_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -206,6 +217,7 @@ public static void f(float _1, int _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -223,6 +235,7 @@ public static void f(java.lang.foreign.MemorySegment _1, float _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_int32_t_rvalue_ref.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -240,6 +253,7 @@ public static void f(int _1, float _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_const_int32_t_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java index 0a917cab..91d64f2c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/phmap/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.phmap; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.phmap.phmap_flat_hash_set_int32_t _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void foo(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static void foo(mrbind_test.phmap.phmap_node_hash_set_int32_t _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -79,6 +82,7 @@ public static void foo(mrbind_test.phmap.phmap_node_hash_map_int32_t_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -100,6 +104,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t _1 try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -121,6 +126,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_fl try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -142,6 +148,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t _1 try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +170,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_fl try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -184,6 +192,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_set_int32_t _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_set_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -205,6 +214,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_map_int32_t_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_map_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +236,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_multiset_int32_t _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multiset_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +258,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_multimap_int32_t_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multimap_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java index 56cc1825..9e86234c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.signaturefilters.A assignFromAnother(mrbind_test.mr.signat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java index eed467cb..14d92f69 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Blah.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.signaturefilters.Blah assignFromAnother(mrbind_test.mr.sig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.Blah(__ret, false, __owner); } @@ -110,6 +113,7 @@ public mrbind_test.mr.signaturefilters.A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -134,6 +138,7 @@ public void setA(mrbind_test.mr.signaturefilters.A value) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java index 885d08b0..35b84c99 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/signaturefilters/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.signaturefilters; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static mrbind_test.mr.signaturefilters.A foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.signaturefilters.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -55,6 +57,7 @@ public static void foo2(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.signaturefilters.A foo2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -95,6 +99,7 @@ public static void foo3(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -116,6 +121,7 @@ public static mrbind_test.mr.signaturefilters.A foo3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -135,6 +141,7 @@ public static void foo4(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +163,7 @@ public static mrbind_test.mr.signaturefilters.A foo4() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -175,6 +183,7 @@ public static void foo5(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -196,6 +205,7 @@ public static mrbind_test.mr.signaturefilters.A foo5() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java index 85ac31fb..d11b6fde 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/staticfuncs/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.staticfuncs.A assignFromAnother(mrbind_test.mr.staticfuncs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.staticfuncs.A(__ret, false, __owner); } @@ -109,6 +112,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -126,6 +130,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -145,6 +150,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java index 3f7589f4..21eb8fd7 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdcontainers.A assignFromAnother(mrbind_test.mr.stdcontai try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java index a4852da4..1dbf7101 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdcontainers; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void Set(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Set.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void SetWithDefault(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_SetWithDefault.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static mrbind_test.mr.cs.std_vector_int32_t Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -76,6 +79,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static void ConstRef(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -139,6 +145,7 @@ public static void RvalueRef(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_RvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +167,7 @@ public static void ConstRvalueRef(mrbind_test.mr.cs.std_vector_int32_t _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -182,6 +190,7 @@ public static mrbind_test.mr.cs.std_deque_int32_t GetDeque() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDeque.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -200,6 +209,7 @@ public static mrbind_test.mr.cs.std_list_int32_t GetList() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetList.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +228,7 @@ public static mrbind_test.mr.cs.std_set_int32_t GetSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -236,6 +247,7 @@ public static mrbind_test.mr.cs.std_multiset_int32_t GetMultiSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -254,6 +266,7 @@ public static mrbind_test.mr.cs.std_unordered_set_int32_t GetUnorderedSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -272,6 +285,7 @@ public static mrbind_test.mr.cs.std_unordered_multiset_int32_t GetUnorderedMulti try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +304,7 @@ public static mrbind_test.mr.cs.std_map_int32_t_float GetMap() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -308,6 +323,7 @@ public static mrbind_test.mr.cs.std_multimap_int32_t_float GetMultiMap() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -326,6 +342,7 @@ public static mrbind_test.mr.cs.std_unordered_map_int32_t_float GetUnorderedMap( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -344,6 +361,7 @@ public static mrbind_test.mr.cs.std_unordered_multimap_int32_t_float GetUnordere try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -362,6 +380,7 @@ public static mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 GetStdArray() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArray.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_MR_StdContainers_A_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -380,6 +399,7 @@ public static mrbind_test.mr.cs.std_array_int32_t_43 GetStdArraySimple() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArraySimple.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_int32_t_43(__ret, null); } catch (java.lang.Throwable __e) @@ -399,6 +419,7 @@ public static void StdArraySimpleParam(mrbind_test.mr.cs.std_array_int32_t_43 _1 try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimpleParam.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -420,6 +441,7 @@ public static mrbind_test.mr.cs.std_array_int32_t_43 StdArraySimplePtr(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimplePtr.invokeExact(mrbind_test.Ffi.ptr(param)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = param; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_array_int32_t_43(__ret.reinterpret(mrbind_test.mr.cs.std_array_int32_t_43.LAYOUT.byteSize()), __owner); } @@ -444,6 +466,7 @@ public static mrbind_test.mr.cs.std_multiset_float GetMultiSetWithMergedIters() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetWithMergedIters.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -462,6 +485,7 @@ public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIter() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIter.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -480,6 +504,7 @@ public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIterConst( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIterConst.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -498,6 +523,7 @@ public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefCon.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible(__ret, true, null); } catch (java.lang.Throwable __e) @@ -516,6 +542,7 @@ public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable GetVec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetVectorNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -534,6 +561,7 @@ public static mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable GetDequ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDequeNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -552,6 +580,7 @@ public static mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable GetListN try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetListNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -570,6 +599,7 @@ public static mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable GetSetNA( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -588,6 +618,7 @@ public static mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable GetM try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +637,7 @@ public static mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -624,6 +656,7 @@ public static mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -642,6 +675,7 @@ public static mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float Get try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -660,6 +694,7 @@ public static mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_floa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -678,6 +713,7 @@ public static mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -696,6 +732,7 @@ public static mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -714,6 +751,7 @@ public static mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42 GetS try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -734,6 +772,7 @@ public static mrbind_test.mr.cs.std_array_int32_t_array_4_array_3_5 GetStdArrayO try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayOfPlainArray.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_int32_t_array_4_array_3_5(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java index 4a0a4140..97014ce9 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonAssignable.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public boolean opLess(mrbind_test.mr.stdcontainers.NonAssignable _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_less_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public boolean opEqual(mrbind_test.mr.stdcontainers.NonAssignable _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_equal_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java index b3efb8e0..7ebb4887 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible assignFromAnother(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java index bb7781e0..ced26e0c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdexpected/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdexpected; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.expected_int32_t_std_string GetExp() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExp.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_int32_t_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetExp(mrbind_test.mr.cs.expected_int32_t_std_string _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExp.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void SetExpConstRef(mrbind_test.mr.cs.expected_int32_t_std_string try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static void SetExpDefTrivial(mrbind_test.mr.cs.expected_int32_t_std_strin try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void SetExpDef(mrbind_test.mr.cs.expected_int32_t_std_string _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static mrbind_test.mr.cs.expected_void_float GetExpVoid() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVoid.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.expected_void_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -136,6 +142,7 @@ public static void SetExpVoid(mrbind_test.mr.cs.expected_void_float _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoid.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -157,6 +164,7 @@ public static void SetExpVoidConstRef(mrbind_test.mr.cs.expected_void_float _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +186,7 @@ public static void SetExpVoidDefTrivial(mrbind_test.mr.cs.expected_void_float _1 try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDefTrivial.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +208,7 @@ public static void SetExpVoidDef(mrbind_test.mr.cs.expected_void_float _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +230,7 @@ public static mrbind_test.mr.cs.std_vector_expected_int32_t_std_string GetExpVec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVec.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_expected_int32_t_std_string(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java index 96057460..b6f01f2a 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfilesystem; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_filesystem_path GetPath() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_GetPath.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -35,6 +36,7 @@ public static void SetPath(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPath.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -53,6 +55,7 @@ public static void SetPathConstRef(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathConstRef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -71,6 +74,7 @@ public static void SetPathDefTrivial(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDefTrivial.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -89,6 +93,7 @@ public static void SetPathDef(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java index 12efd32a..e4c0462f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFrom.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.stdfunction.A assignFromAnother(mrbind_test.mr.stdfunction try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdfunction.A(__ret, false, __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_string a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -160,6 +165,7 @@ public void setA(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java index e4793da5..dfcbb296 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdfunction/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfunction; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.mr.cs.std_function_int32_t _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int32_t_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_int32_t_int32_t try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_int32_t_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static void foo(mrbind_test.mr.cs.std_function_int32_t_from_int32_t_int32 try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int32_t_func_from_int32_t_int32_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -79,6 +82,7 @@ public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int3 try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int32_t_MR_StdFunction_E.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -100,6 +104,7 @@ public static void foo(mrbind_test.mr.cs.std_function_std_string_from_int32_t_fl try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_std_string_func_from_int32_t_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -121,6 +126,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_std_string _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_std_string.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -142,6 +148,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +170,7 @@ public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_A _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_A_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java index 5b1d7a35..70106ea4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } @@ -134,6 +138,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java index 290a2da7..9484afc6 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -160,6 +165,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java index 9ad9b7c4..fb221623 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdoptional/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdoptional; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_optional_int32_t GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetInt.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntConstRef(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -68,6 +71,7 @@ public static void SetIntDefTrivial(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -85,6 +89,7 @@ public static void SetIntDef(mrbind_test.mr.cs.std_optional_int32_t _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -106,6 +111,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_E GetEnum() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_E(__ret, true, null); } catch (java.lang.Throwable __e) @@ -124,6 +130,7 @@ public static void SetEnum(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnum.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -141,6 +148,7 @@ public static void SetEnumConstRef(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -158,6 +166,7 @@ public static void SetEnumDefTrivial(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +184,7 @@ public static void SetEnumDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_E _1 try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -196,6 +206,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -214,6 +225,7 @@ public static void SetClass(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -235,6 +247,7 @@ public static void SetClassConstRef(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -256,6 +269,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDefTrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -277,6 +291,7 @@ public static void SetClassDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_A _ try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -298,6 +313,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_B GetClass2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_B(__ret, true, null); } catch (java.lang.Throwable __e) @@ -316,6 +332,7 @@ public static void SetClass2(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -337,6 +354,7 @@ public static void SetClass2ConstRef(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2ConstRef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -358,6 +376,7 @@ public static void SetClass2DefTrivial(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -379,6 +398,7 @@ public static void SetClass2Def(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java index 28b7fcc2..42f38dc8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdsharedptr.A assignFromAnother(mrbind_test.mr.stdsharedp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java index 6e0b8e8a..fd6226ae 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdsharedptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetInt.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void SetIntConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static void SetIntDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void SetIntDef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static void SetIntLvalueRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -139,6 +145,7 @@ public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +167,7 @@ public static void SetIntRvalueRef(mrbind_test.mr.cs.std_shared_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -181,6 +189,7 @@ public static void SetIntRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int32_t try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -202,6 +211,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array GetIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +230,7 @@ public static void SetIntArr(mrbind_test.mr.cs.std_shared_ptr_int32_t_array _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -241,6 +252,7 @@ public static void SetIntArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_t_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -262,6 +274,7 @@ public static void SetIntArrDef(mrbind_test.mr.cs.std_shared_ptr_int32_t_array _ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +296,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 GetIntArr42() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -301,6 +315,7 @@ public static void SetIntArr42(mrbind_test.mr.cs.std_shared_ptr_int32_t_array_42 try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -322,6 +337,7 @@ public static void SetIntArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_int32_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -343,6 +359,7 @@ public static void SetIntArr42Def(mrbind_test.mr.cs.std_shared_ptr_int32_t_array try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -364,6 +381,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +400,7 @@ public static void SetClass(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClass.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -403,6 +422,7 @@ public static void SetClassConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShare try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -424,6 +444,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSha try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -445,6 +466,7 @@ public static void SetClassDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -466,6 +488,7 @@ public static void SetClassLvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShar try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -487,6 +510,7 @@ public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_St try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -508,6 +532,7 @@ public static void SetClassRvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShar try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +554,7 @@ public static void SetClassRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_St try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +576,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array GetClassA try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -568,6 +595,7 @@ public static void SetClassArr(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -589,6 +617,7 @@ public static void SetClassArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_Std try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -610,6 +639,7 @@ public static void SetClassArrDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedP try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -631,6 +661,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 GetCla try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -649,6 +680,7 @@ public static void SetClassArr42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPt try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -670,6 +702,7 @@ public static void SetClassArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_S try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -691,6 +724,7 @@ public static void SetClassArr42Def(mrbind_test.mr.cs.std_shared_ptr_MR_StdShare try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -714,6 +748,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t GetConstInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -732,6 +767,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array GetConstIntAr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -750,6 +786,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42 GetConstIn try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int32_t_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -768,6 +805,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A GetConstC try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -786,6 +824,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array Get try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -804,6 +843,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java index d0049795..f58ee771 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstring/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstring; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void Set(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void SetWithDefault(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_string Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_string ref) try { mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +95,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_string ptr) try { mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +118,7 @@ public static void ConstRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +137,7 @@ public static void RvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -149,6 +156,7 @@ public static void ConstRvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java index 5a809a36..771bdf30 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdstringview/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstringview; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void Set(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void SetWithDefault(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_string_view Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_string_view ref) try { mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +95,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_string_view ptr) try { mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +118,7 @@ public static void ConstRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +137,7 @@ public static void RvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -149,6 +156,7 @@ public static void ConstRvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java index 5e9e9ad0..c109410b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdtuplelike; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void SetPair(mrbind_test.mr.cs.std_pair_int32_t_float _1) try { mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetPair.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static mrbind_test.mr.cs.std_pair_int32_t_float GetPair() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -55,6 +57,7 @@ public static mrbind_test.mr.cs.std_pair_const_int32_t_float GetPair2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -73,6 +76,7 @@ public static mrbind_test.mr.cs.std_pair_int32_t_ref_float_ref GetPair3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair3.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int32_t_ref_float_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -91,6 +95,7 @@ public static mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref GetPa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair4.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int32_t_ref_const_float_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -109,6 +114,7 @@ public static mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref Get try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair5.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int32_t_rvalue_ref_float_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -127,6 +133,7 @@ public static mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rv try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair6.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int32_t_rvalue_ref_const_float_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -145,6 +152,7 @@ public static void SetTuple(mrbind_test.mr.cs.std_tuple_int32_t_float _1) try { mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetTuple.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -166,6 +174,7 @@ public static mrbind_test.mr.cs.std_tuple_int32_t_float GetTuple() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -185,6 +194,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int32_t_const_float_int32_t_ref_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int32_t_const_float_int32_t_ref_float_ref_const_int32_t_ref_const_float_ref_int32_t___a385e102(__ret, true, null); } catch (java.lang.Throwable __e) @@ -203,6 +213,7 @@ public static mrbind_test.mr.cs.std_tuple GetTuple7() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple7.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +232,7 @@ public static mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t GetTuple8 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple8.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_float_double_int32_t_int32_t(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java index fa476c36..713529bc 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stduniqueptr.A assignFromAnother(mrbind_test.mr.stduniquep try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java index df9d2c5b..d7c940ef 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stduniqueptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static java.lang.foreign.MemorySegment GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntConstRef(mrbind_test.mr.cs.std_unique_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -72,6 +75,7 @@ public static void SetIntDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -89,6 +93,7 @@ public static void SetIntDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -106,6 +111,7 @@ public static void SetIntLvalueRef(mrbind_test.mr.cs.std_unique_ptr_int32_t _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -123,6 +129,7 @@ public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_int32_t try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -144,6 +151,7 @@ public static void SetIntRvalueRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +169,7 @@ public static void SetIntRvalueConstRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueConstRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +187,7 @@ public static java.lang.foreign.MemorySegment GetIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +206,7 @@ public static void SetIntArr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -213,6 +224,7 @@ public static void SetIntArrDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -230,6 +242,7 @@ public static void SetIntArrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +260,7 @@ public static mrbind_test.mr.stduniqueptr.A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +279,7 @@ public static void SetClass(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClass.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -282,6 +297,7 @@ public static void SetClassConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniqu try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -303,6 +319,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -320,6 +337,7 @@ public static void SetClassDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -337,6 +355,7 @@ public static void SetClassLvalueRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniq try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -354,6 +373,7 @@ public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_St try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -375,6 +395,7 @@ public static void SetClassRvalueRef(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +413,7 @@ public static void SetClassRvalueConstRef(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueConstRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -409,6 +431,7 @@ public static mrbind_test.mr.stduniqueptr.A GetClassArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -427,6 +450,7 @@ public static void SetClassArr(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArr.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -444,6 +468,7 @@ public static void SetClassArrDefTrivial(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -461,6 +486,7 @@ public static void SetClassArrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -479,6 +505,7 @@ public static int GetConstInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -497,6 +524,7 @@ public static int GetConstIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -515,6 +543,7 @@ public static java.lang.foreign.MemorySegment GetConstClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -533,6 +562,7 @@ public static java.lang.foreign.MemorySegment GetConstClassArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -552,6 +582,7 @@ public static java.lang.foreign.MemorySegment GetFloat() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetFloat.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -570,6 +601,7 @@ public static void SetFloat(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloat.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -587,6 +619,7 @@ public static void SetFloatDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloatDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java index b9dca994..cc5d5962 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/stdvariant/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdvariant; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_variant_int32_t_float foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.cs.std_variant_int32_t_float_float _1) try { mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void baz(mrbind_test.mr.cs.std_variant_int32_t_float_std_string _1 try { mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_baz.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_blah.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int32_t_float(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java index f648b7af..7a9dd7ca 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/tags/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.tags; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo_1_std_less_int32_t() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_int32_t.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void foo_1_std_less_void() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_void.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -50,6 +52,7 @@ public static void foo_1_std_greater_int32_t() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_int32_t.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -67,6 +70,7 @@ public static void foo_1_std_greater_void() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_void.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -84,6 +88,7 @@ public static void foo_0() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java index cc4b6ff6..b4716cf4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_uint64_t(long _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_int32_t(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int32_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t assignFromAnother(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void foo_uint64_t() try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -158,6 +163,7 @@ public void foo_int32_t() try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java index 99c1a171..a34febda 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsimpletypes; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static int GetInt() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(int _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntDef(java.lang.Integer _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -68,6 +71,7 @@ public static java.lang.foreign.MemorySegment GetIntPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +90,7 @@ public static void SetIntPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -103,6 +108,7 @@ public static void SetIntPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -120,6 +126,7 @@ public static void SetIntPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -137,6 +144,7 @@ public static java.lang.foreign.MemorySegment GetIntRef() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntRef.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +163,7 @@ public static void SetIntRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +181,7 @@ public static void SetIntRefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -189,6 +199,7 @@ public static java.lang.foreign.MemorySegment GetVoidPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +218,7 @@ public static void SetVoidPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -224,6 +236,7 @@ public static void SetVoidPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -241,6 +254,7 @@ public static void SetVoidPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +272,7 @@ public static java.lang.foreign.MemorySegment GetConstVoidPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetConstVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -276,6 +291,7 @@ public static void SetConstVoidPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -293,6 +309,7 @@ public static void SetConstVoidPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -310,6 +327,7 @@ public static void SetConstVoidPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -327,6 +345,7 @@ public static java.lang.foreign.MemorySegment GetVoidPtrPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtrPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -345,6 +364,7 @@ public static void SetVoidPtrPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -362,6 +382,7 @@ public static void SetVoidPtrPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -379,6 +400,7 @@ public static void SetVoidPtrPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -396,6 +418,7 @@ public static int GetEnum() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -414,6 +437,7 @@ public static void SetEnum(mrbind_test.mr.testsimpletypes.E _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -431,6 +455,7 @@ public static void SetEnumDef(mrbind_test.mr.testsimpletypes.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1.value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -448,6 +473,7 @@ public static java.lang.foreign.MemorySegment GetEnumPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -466,6 +492,7 @@ public static void SetEnumPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -483,6 +510,7 @@ public static void SetEnumPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -500,6 +528,7 @@ public static void SetEnumPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -517,6 +546,7 @@ public static java.lang.foreign.MemorySegment GetEnumRef() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumRef.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -535,6 +565,7 @@ public static void SetEnumRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +583,7 @@ public static void SetEnumRefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -569,6 +601,7 @@ public static int GetEnum2() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -587,6 +620,7 @@ public static void SetEnum2(mrbind_test.mr.testsimpletypes.E2 _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +638,7 @@ public static void SetEnum2Def(mrbind_test.mr.testsimpletypes.E2 _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Def.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, _1.value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -621,6 +656,7 @@ public static java.lang.foreign.MemorySegment GetEnum2Ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -639,6 +675,7 @@ public static void SetEnum2Ptr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -656,6 +693,7 @@ public static void SetEnum2PtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -673,6 +711,7 @@ public static void SetEnum2PtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -690,6 +729,7 @@ public static java.lang.foreign.MemorySegment GetEnum2Ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -708,6 +748,7 @@ public static void SetEnum2Ref(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ref.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -725,6 +766,7 @@ public static void SetEnum2RefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2RefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -743,6 +785,7 @@ public static void CheckCharMaybeUnsigned(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckCharMaybeUnsigned.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -760,6 +803,7 @@ public static void checkChar_uint8_t_ptr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_uint8_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -777,6 +821,7 @@ public static void checkChar_int8_t_ptr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_int8_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -794,6 +839,7 @@ public static long blah_uint64_t(long x) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_uint64_t.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -812,6 +858,7 @@ public static long blah_int64_t(long x) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_int64_t.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -831,6 +878,7 @@ public static long FuncTemplate(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -850,6 +898,7 @@ public static int FuncTemplate(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_int32_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java index fb8a1130..4130e5a1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/A_uint64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.testsizet.A_uint64_t assignFromAnother(mrbind_test.mr.test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.testsizet.A_uint64_t(__ret, false, __owner); } @@ -109,6 +112,7 @@ public long foo() try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java index 68382cc2..16527ff1 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/testsizet/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsizet; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static long foo_uint64_t(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static java.lang.foreign.MemorySegment foo_uint64_t_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_vector_uint64_t foo(mrbind_test.mr.cs.std_ve try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_uint64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -74,6 +77,7 @@ public static long foo_int64_t(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +96,7 @@ public static java.lang.foreign.MemorySegment foo_int64_t_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +115,7 @@ public static mrbind_test.mr.cs.std_vector_int64_t foo(mrbind_test.mr.cs.std_vec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_int64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java index 2cf34315..97bf307f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/A_int32_t.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.typedefsintemplates.A_int32_t assignFromAnother(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.A_int32_t(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int foo() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int32_t_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java index fb53e9ad..7d4f292d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.typedefsintemplates.B_int32_t assignFromAnother(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.B_int32_t(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java index 4640c150..e22882b2 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/B_int32_t_BB_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float assignFromAnother(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.B_int32_t_BB_float(__ret, false, __owner); } @@ -109,6 +112,7 @@ public int foo() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public int foo2() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int32_t_BB_float_foo2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java index fb77bd94..b41c489f 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.typedefsintemplates; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void bar(int _1) try { mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java index 4c27b6fc..8023c060 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/A.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public int convertTo_int32_t() try { int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConvertTo_int32_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.usingdecls.A assignFromAnother(mrbind_test.mr.usingdecls.A try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.usingdecls.A(__ret, false, __owner); } @@ -135,6 +139,7 @@ public void assign(int _1) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_assign.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public void Method() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -177,6 +183,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public static int StaticVar() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -213,6 +221,7 @@ public static void setStaticVar(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -231,6 +240,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -254,6 +264,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java index 20f03260..46eb26bb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/mr/usingdecls/B.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.usingdecls.B(__ret, false, __owner); } @@ -78,4 +80,44 @@ public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::UsingDecls::A`. The result refers to this object. + * + * Calls `MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A()`. */ + public mrbind_test.mr.usingdecls.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A.invokeExact(rawPointer()); + return new mrbind_test.mr.usingdecls.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::UsingDecls::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A()`. */ + public static mrbind_test.mr.usingdecls.B staticDowncastFromA(mrbind_test.mr.usingdecls.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.usingdecls.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java index 3ad9b6b3..be8306c8 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float ot try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator find(int k try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator find_mut(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_map_int32_t_float_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_map_int32_t_float_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java index c1b09a45..29f0b4bd 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_co try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java index 7d71685d..31a70a8e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int32_t_float_it try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_map_int32_t_float.H0.MR_C_phmap_btree_map_int32_t_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java index 33e74795..07fc75cb 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_flo try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator find( try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator find_mut(in try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator begin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_con try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_ite try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_const try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int32_t_float_itera try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java index 71dbe706..dea7d00d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_flo try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java index fb5f28a9..d30eccb3 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multimap_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int32_t_flo try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multimap_int32_t_float.H0.MR_C_phmap_btree_multimap_int32_t_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java index fe2d051f..82309d91 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t oth try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator find(int ke try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_ite try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multiset_int32_t_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java index 22da6bf8..a9b3451e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_multiset_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int32_t_con try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multiset_int32_t.H0.MR_C_phmap_btree_multiset_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java index 244ea122..558b5a07 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t other) try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_set_int32_t_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java index f7837b40..9189bb7d 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_btree_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int32_t_const_it try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_set_int32_t.H0.MR_C_phmap_btree_set_int32_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java index b7b526b3..0be03705 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator find(i try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator find_mut(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator begin( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_cons try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_const_ try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int32_t_float_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java index e3e8b7a5..e08f144e 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java index 17645640..2484f94c 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_map_int32_t_float.H0.MR_C_phmap_flat_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java index 3db432d8..47c0f370 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t othe try { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator find(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_set_int32_t_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java index 17a4f232..4b9682e4 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_flat_hash_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int32_t_cons try { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_set_int32_t.H0.MR_C_phmap_flat_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java index 3da4bd0f..c5f8692b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator find(i try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator find_mut(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator begin( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_cons try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_const_ try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int32_t_float_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java index 600daa51..f7b46d22 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java index a8246b24..c7200b13 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int32_t_floa try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_map_int32_t_float.H0.MR_C_phmap_node_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java index 30a78205..f426eb49 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t othe try { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator find(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_set_int32_t_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java index 42cb5923..e4f41888 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_node_hash_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int32_t_cons try { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_set_int32_t.H0.MR_C_phmap_node_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java index ae6d1465..83ffff9b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterat try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator fin try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator beg try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator end try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java index 8fee9883..3b3a758b 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java index 571ce3df..96f3e916 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int32_t_float.H0.MR_C_phmap_parallel_flat_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java index 469d3c26..0d27f9df 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator fin try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator beg try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_c try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator end try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_set_int32_t_con try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java index f6f7765f..37e4b230 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int32_t.H0.MR_C_phmap_parallel_flat_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java index 16690f92..dc2a7f66 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterat try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator fin try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator beg try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_f try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator end try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int32_t_flo try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java index eae8afb7..c4dc9811 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java index 546a98ad..7b4a4302 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int32_t_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int32_t_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int32_t_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int32_t_float.H0.MR_C_phmap_parallel_node_hash_map_int32_t_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java index fc2aad65..24c12785 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator fin try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator beg try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -306,6 +318,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_c try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -330,6 +343,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator end try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_set_int32_t_con try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java index 9d561bb5..d2c89697 100644 --- a/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java +++ b/test/output_java_fixed_typedefs/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int32_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_set_int32_t.H0.MR_C_phmap_parallel_node_hash_set_int32_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java index 5969c872..3f1347df 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppException.java @@ -1,6 +1,6 @@ package mrbind_test; -/** A C++ exception thrown by the C bindings. Generated by mrbind, do not edit. */ +/** A C++ exception thrown by the C bindings. */ public class CppException extends RuntimeException { private static final long serialVersionUID = 1; diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java index 2909e68e..a945b109 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppObject.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the opaque C++ classes. Generated by mrbind, do not edit. + * The base class of the wrappers of the opaque C++ classes. * * An instance either owns its C++ object (then the object is destroyed when the wrapper is garbage-collected or closed), * or is a reference to an object owned by something else. References returned by methods keep their owner alive. diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java index 16a3e7c1..b7485a86 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/CppStruct.java @@ -1,7 +1,7 @@ package mrbind_test; /** - * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. Generated by mrbind, do not edit. + * The base class of the wrappers of the C++ structs exposed with `--expose-as-struct`. * * An instance is a view over a memory segment holding the struct. Instances created in Java own their memory (freed by the garbage collector), * those returned by reference from the bindings point into memory owned by something else, which they keep alive. diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java index 21a531ef..ce5f8895 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Ffi.java @@ -1,6 +1,6 @@ package mrbind_test; -/** The runtime support of the generated bindings. Generated by mrbind, do not edit. */ +/** The runtime support of the bindings. */ @SuppressWarnings("restricted") // The restricted methods warn unless `--enable-native-access` is passed, this is where we use them. public final class Ffi { @@ -277,4 +277,85 @@ public static RuntimeException rethrow(Throwable e) throw err; return new RuntimeException(e); } + + // What the wrapper must throw once the C call returns: a C++ exception message reported by the C bindings (a String), + // or an exception thrown by a Java callback (a Throwable). Per thread, since the C bindings report per thread. + private static final ThreadLocal PENDING = new ThreadLocal<>(); + + /** Throws if the last call into the C bindings threw a C++ exception, or a Java callback threw. */ + public static void checkException() + { + Object pending = PENDING.get(); + if (pending == null) + return; + PENDING.remove(); + if (pending instanceof Throwable error) + throw rethrow(error); + throw new CppException((String)pending); + } + + /** Called by the callback trampolines when the Java callable throws. The exception is rethrown by the wrapper that made the C call. */ + public static void callbackFailed(Throwable error) + { + if (PENDING.get() == null) + PENDING.set(error); + } + + /** Creates an upcall stub for a static method of `cls`. The lookup must be able to see the method. */ + public static java.lang.foreign.MemorySegment upcall(java.lang.invoke.MethodHandles.Lookup lookup, Class cls, String name, java.lang.foreign.FunctionDescriptor desc) + { + try + { + return LINKER.upcallStub(lookup.findStatic(cls, name, desc.toMethodType()), desc, java.lang.foreign.Arena.global()); + } + catch (ReflectiveOperationException e) + { + throw new IllegalStateException(e); + } + } + + // The Java callables held by the `std::function` instances, keyed by the ids that are passed to C as the user data pointers. + // Each entry is the callable and its reference count: the copies of a `std::function` share the user data. + private static final java.util.concurrent.ConcurrentHashMap CALLBACKS = new java.util.concurrent.ConcurrentHashMap<>(); + private static final java.util.concurrent.atomic.AtomicLong NEXT_CALLBACK_ID = new java.util.concurrent.atomic.AtomicLong(1); + + /** Registers a callable and returns its user data pointer, with one reference. */ + public static java.lang.foreign.MemorySegment newCallbackState(Object callable) + { + long id = NEXT_CALLBACK_ID.getAndIncrement(); + CALLBACKS.put(id, new Object[]{callable, new java.util.concurrent.atomic.AtomicInteger(1)}); + return java.lang.foreign.MemorySegment.ofAddress(id); + } + + /** The callable registered under a user data pointer. */ + public static Object callbackState(java.lang.foreign.MemorySegment userdata) + { + Object[] entry = CALLBACKS.get(userdata.address()); + if (entry == null) + throw new IllegalStateException("Unknown callback state: " + userdata.address() + "."); + return entry[0]; + } + + // The `userdata_callback` of the C bindings: releases the user data of `this` object, then copies the other one into it, if any. + private static void callbackStateChanged(java.lang.foreign.MemorySegment thisUserdata, java.lang.foreign.MemorySegment otherUserdata) + { + java.lang.foreign.MemorySegment slot = thisUserdata.reinterpret(java.lang.foreign.ValueLayout.ADDRESS.byteSize()); + long current = slot.get(java.lang.foreign.ValueLayout.ADDRESS, 0).address(); + if (current != 0) + { + Object[] entry = CALLBACKS.get(current); + if (entry != null && ((java.util.concurrent.atomic.AtomicInteger)entry[1]).decrementAndGet() == 0) + CALLBACKS.remove(current); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, java.lang.foreign.MemorySegment.NULL); + } + if (otherUserdata.address() != 0) + { + Object[] entry = CALLBACKS.get(otherUserdata.address()); + if (entry != null) + ((java.util.concurrent.atomic.AtomicInteger)entry[1]).incrementAndGet(); + slot.set(java.lang.foreign.ValueLayout.ADDRESS, 0, otherUserdata); + } + } + + public static final java.lang.foreign.MemorySegment CALLBACK_STATE_STUB = upcall(java.lang.invoke.MethodHandles.lookup(), Ffi.class, "callbackStateChanged", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java index f9d8474e..30d65d27 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/Native.java @@ -1,6 +1,6 @@ package mrbind_test; -/** Implemented by the wrappers of native objects. Generated by mrbind, do not edit. */ +/** Implemented by the wrappers of native objects. */ public interface Native { /** The address of the native object. For opaque classes it's a zero-length segment, for exposed structs it covers the struct. */ diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java index 397858a5..e2fcc56b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/A/a.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.A; -/** The downcall handles of the C bindings file `A/a`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `A/a`. */ public final class a { private a() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateA_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateA_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java index fbbf3c7f..aa6a1e9f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_pair_MR_SeparateA_MR_SeparateB { private std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java index 02995036..6f781433 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateA`. */ public final class std_shared_ptr_MR_SeparateA { private std_shared_ptr_MR_SeparateA() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java index 2abc314d..6c164600 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_shared_ptr_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_shared_ptr_MR_SeparateB`. */ public final class std_shared_ptr_MR_SeparateB { private std_shared_ptr_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java index 18d4e57e..0f233314 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateA`. */ public final class std_vector_MR_SeparateA { private std_vector_MR_SeparateA() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java index 9cd0521a..585f63e9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_vector_MR_SeparateB`. */ public final class std_vector_MR_SeparateB { private std_vector_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java index 39e97748..18b60d1d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB.common; -/** The downcall handles of the C bindings file `AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB/common/std_vector_std_pair_MR_SeparateA_MR_SeparateB`. */ public final class std_vector_std_pair_MR_SeparateA_MR_SeparateB { private std_vector_std_pair_MR_SeparateA_MR_SeparateB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java index 053d5b1a..5fcaed0c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/AB_base/ab_base.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.AB_base; -/** The downcall handles of the C bindings file `AB_base/ab_base`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `AB_base/ab_base`. */ public final class ab_base { private ab_base() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java index c05e16c3..1c0669fd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/B/b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.B; -/** The downcall handles of the C bindings file `B/b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `B/b`. */ public final class b { private b() {} @@ -13,5 +13,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_SeparateB_ConstructFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_AssignFromAnother = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_SeparateB_Destroy = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB = mrbind_test.Ffi.downcall("MR_AB_", "MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java index 0b883a82..35518947 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/_1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/1`. */ public final class _1 { private _1() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java index a9e022e4..3bce5034 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_abstract_classes.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_abstract_classes`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_abstract_classes`. */ public final class test_abstract_classes { private test_abstract_classes() {} @@ -14,5 +14,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_AbstractClasses_B_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_foo = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_Destroy = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B = mrbind_test.Ffi.downcall("", "MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java index ae649f6b..bdbee631 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_adjusting_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_adjusting_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_adjusting_names`. */ public final class test_adjusting_names { private test_adjusting_names() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java index 33cc0d87..e6078ca4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_aggregates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_aggregates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_aggregates`. */ public final class test_aggregates { private test_aggregates() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java index e61dea09..d332e12e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types`. */ public final class test_arrays_of_incomplete_types { private test_arrays_of_incomplete_types() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java index c992d055..d6f17c03 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_arrays_of_incomplete_types_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_arrays_of_incomplete_types_2`. */ public final class test_arrays_of_incomplete_types_2 { private test_arrays_of_incomplete_types_2() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java index 6d464b87..aead1bba 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_bases.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_bases`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_bases`. */ public final class test_bases { private test_bases() {} @@ -17,14 +17,22 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_B_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_B2_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_B2_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_B2_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_B2_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableUpcastTo_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableUpcastTo_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B = mrbind_test.Ffi.downcall("", "MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_C_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_D_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_D_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -45,17 +53,28 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_Bases_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_F_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_G_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_G_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_G_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_H_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_H_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_Bases_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_Bases_I_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_Bases_I_Destroy = mrbind_test.Ffi.downcall("", "MR_Bases_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_E = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_F = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_F", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_Bases_I_MutableUpcastTo_MR_Bases_A = mrbind_test.Ffi.downcall("", "MR_Bases_I_MutableUpcastTo_MR_Bases_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java index 9e52d501..a2a94fa6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_combined_a_b.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_combined_a_b`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_combined_a_b`. */ public final class test_combined_a_b { private test_combined_a_b() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java index ede36e45..7269189d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_conv_ops.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_conv_ops`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_conv_ops`. */ public final class test_conv_ops { private test_conv_ops() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java index f56a456d..3542c3c5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_copy_inherited_members.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_copy_inherited_members`. */ public final class test_copy_inherited_members { private test_copy_inherited_members() {} @@ -41,6 +41,10 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -54,14 +58,28 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -75,6 +93,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -88,6 +107,9 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -101,6 +123,9 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -114,6 +139,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_K_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_K_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -135,6 +162,8 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -148,6 +177,10 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_ConvertTo_int = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_ConvertTo_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -161,5 +194,11 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_GetMutable_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_GetMutable_Field", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Set_Field = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Set_Field", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_Destroy = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N = mrbind_test.Ffi.downcall("", "MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java index e8f62dd4..21dc4403 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_csharp.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_csharp`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_csharp`. */ public final class test_csharp { private test_csharp() {} @@ -408,23 +408,28 @@ private H1() {} public static final java.lang.invoke.MethodHandle MR_CSharp_B_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_B_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_B_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_B_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_C_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_C_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); - public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); } public static final class H2 { private H2() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_C_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_foo", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_static_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_static_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_virtual_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_C_virtual_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_refs = mrbind_test.Ffi.downcall("", "MR_CSharp_C_refs", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_C_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_C_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_CallOp_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_CallOp_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -616,17 +621,17 @@ private H2() {} public static final java.lang.invoke.MethodHandle MR_C_equal_MR_CSharp_ExposedLayout_float = mrbind_test.Ffi.downcall("", "MR_C_equal_MR_CSharp_ExposedLayout_float", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_FLOAT)); public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayout_char = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayout_char", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_BYTE)); public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_2 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_2", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); - public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); - public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); } public static final class H3 { private H3() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutB_Construct_1 = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutB_Construct_1", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutB.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_foo = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_foo", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_bar = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_bar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_ExposedLayoutSh_blah = mrbind_test.Ffi.downcall("", "MR_CSharp_ExposedLayoutSh_blah", java.lang.foreign.FunctionDescriptor.ofVoid()); + public static final java.lang.invoke.MethodHandle MR_C_incr_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_incr_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_add_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_add_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_mul_MR_CSharp_ExposedLayoutSh_int = mrbind_test.Ffi.downcall("", "MR_C_mul_MR_CSharp_ExposedLayoutSh_int", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_ExposedLayoutSh = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_ExposedLayoutSh", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -649,6 +654,13 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_F_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_F_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_F_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_F_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_G_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_G_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -664,6 +676,12 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_G_e1 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e1", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_e2 = mrbind_test.Ffi.downcall("", "MR_CSharp_G_e2", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_G_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_G_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_G_MutableUpcastTo_MR_CSharp_E = mrbind_test.Ffi.downcall("", "MR_CSharp_G_MutableUpcastTo_MR_CSharp_E", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IncrDecrA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IncrDecrA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -809,6 +827,12 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H4 + { + private H4() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableG_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableG_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); @@ -827,12 +851,6 @@ private H3() {} public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_begin = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_begin", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_end = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_end", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H4 - { - private H4() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_Get_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_Get_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetMutable_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetMutable_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_IterableI_GetSize_arr = mrbind_test.Ffi.downcall("", "MR_CSharp_IterableI_GetSize_arr", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_LONG)); @@ -1015,6 +1033,12 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_RelationalE_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_RelationalE_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H5 + { + private H5() {} + public static final java.lang.invoke.MethodHandle MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC = mrbind_test.Ffi.downcall("", "MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1033,12 +1057,6 @@ private H4() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SA_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SA_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SA_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H5 - { - private H5() {} - public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFrom = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFrom", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SB_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SB_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1053,6 +1071,10 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SC_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SC_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB = mrbind_test.Ffi.downcall("", "MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SD_AssignFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_SD_AssignFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1072,6 +1094,11 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_SF_GetMutable_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_GetMutable_s", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Set_s = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Set_s", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SF_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE = mrbind_test.Ffi.downcall("", "MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_SG_Destroy = mrbind_test.Ffi.downcall("", "MR_CSharp_SG_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_DefaultConstruct = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_DefaultConstruct", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_StaticOpsLhsA_ConstructFromAnother = mrbind_test.Ffi.downcall("", "MR_CSharp_StaticOpsLhsA_ConstructFromAnother", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1212,6 +1239,12 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_mod_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_mod_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_xor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_xor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitand_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitand_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + } + + public static final class H6 + { + private H6() {} + public static final java.lang.invoke.MethodHandle MR_CSharp_TestOpsA_bitor_assign = mrbind_test.Ffi.downcall("", "MR_CSharp_TestOpsA_bitor_assign", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_lshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_lshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_rshift_MR_CSharp_TestOpsA = mrbind_test.Ffi.downcall("", "MR_C_rshift_MR_CSharp_TestOpsA", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); @@ -1239,12 +1272,6 @@ private H5() {} public static final java.lang.invoke.MethodHandle MR_C_xor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_xor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_addressof_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_addressof_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_bitand_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitand_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); - } - - public static final class H6 - { - private H6() {} - public static final java.lang.invoke.MethodHandle MR_C_bitor_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_bitor_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_compl_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_compl_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_not_MR_CSharp_TestOpsB = mrbind_test.Ffi.downcall("", "MR_C_not_MR_CSharp_TestOpsB", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java index 46bfd0e7..f66110e9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_custom_preferred_names.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_custom_preferred_names`. */ public final class test_custom_preferred_names { private test_custom_preferred_names() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java index 2d1c9ac2..2f792da8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_declaration_order.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_declaration_order`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_declaration_order`. */ public final class test_declaration_order { private test_declaration_order() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java index d7791105..be854c6a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_deprecation.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_deprecation`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_deprecation`. */ public final class test_deprecation { private test_deprecation() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java index 6d1a532d..516cd872 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants`. */ public final class test_includes_for_enum_constants { private test_includes_for_enum_constants() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java index 6d263071..6cd6a94f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_2.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_2`. */ public final class test_includes_for_enum_constants_2 { private test_includes_for_enum_constants_2() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java index 4dc1659c..a6c1db34 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_includes_for_enum_constants_3.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_includes_for_enum_constants_3`. */ public final class test_includes_for_enum_constants_3 { private test_includes_for_enum_constants_3() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java index 14b90d68..cf32410c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_iostream`. */ public final class test_iostream { private test_iostream() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java index 72709289..e3d4041b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_lifetime_inference.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_lifetime_inference`. */ public final class test_lifetime_inference { private test_lifetime_inference() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java index e9fb1312..dda299b1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_matching_layout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_matching_layout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_matching_layout`. */ public final class test_matching_layout { private test_matching_layout() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java index 480d22f7..80b05b20 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_member_vars.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_member_vars`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_member_vars`. */ public final class test_member_vars { private test_member_vars() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java index d101f32e..e429b601 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_mention_blacklists.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_mention_blacklists`. */ public final class test_mention_blacklists { private test_mention_blacklists() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java index b63d70c3..663f9224 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_class_template_inst.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_class_template_inst`. */ public final class test_nested_class_template_inst { private test_nested_class_template_inst() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java index 151f301e..ad966fcf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_nested_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_nested_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_nested_types`. */ public final class test_nested_types { private test_nested_types() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java index 528901a3..c45226cd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_omitting_template_args_and_quals.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_omitting_template_args_and_quals`. */ public final class test_omitting_template_args_and_quals { private test_omitting_template_args_and_quals() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java index 5a68a556..ce5bdcde 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloaded_operators.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloaded_operators`. */ public final class test_overloaded_operators { private test_overloaded_operators() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java index 9dfcbd14..9b9c285b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_overloads.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_overloads`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_overloads`. */ public final class test_overloads { private test_overloads() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java index 03f57869..6d674e77 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_phmap.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_phmap`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_phmap`. */ public final class test_phmap { private test_phmap() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java index 3fe90d9b..6e489658 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_simple_types.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_simple_types`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_simple_types`. */ public final class test_simple_types { private test_simple_types() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java index 5d44359e..382ecaaa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_size_t_ptrdiff_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_size_t_ptrdiff_t`. */ public final class test_size_t_ptrdiff_t { private test_size_t_ptrdiff_t() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java index f1670f9a..d6880507 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_static_memberr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_static_memberr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_static_memberr`. */ public final class test_static_memberr { private test_static_memberr() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java index cb43f85e..1277fca9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_containers.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_containers`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_containers`. */ public final class test_std_containers { private test_std_containers() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java index 91102810..88ec684d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_expected.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_expected`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_expected`. */ public final class test_std_expected { private test_std_expected() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java index a1136b31..6f7d572c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_filesystem.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_filesystem`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_filesystem`. */ public final class test_std_filesystem { private test_std_filesystem() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java index 0e68fdf2..b8bef6bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_function.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_function`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_function`. */ public final class test_std_function { private test_std_function() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java index 7350f68b..9484cdac 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_optional.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_optional`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_optional`. */ public final class test_std_optional { private test_std_optional() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java index 1f445355..c3210bb9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_shared_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_shared_ptr`. */ public final class test_std_shared_ptr { private test_std_shared_ptr() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java index f18d09b9..b4897179 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string`. */ public final class test_std_string { private test_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java index 6f7e95cb..160182b4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_string_view`. */ public final class test_std_string_view { private test_std_string_view() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java index 37f0e2c3..4fc442e3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_tuple_like.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_tuple_like`. */ public final class test_std_tuple_like { private test_std_tuple_like() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java index 582bbab5..84f400d6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_std_unique_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_std_unique_ptr`. */ public final class test_std_unique_ptr { private test_std_unique_ptr() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java index b19273f1..ebafd4fd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_tags.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_tags`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_tags`. */ public final class test_tags { private test_tags() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java index 49fda92e..ae94ef2b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_typedefs_in_templates.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_typedefs_in_templates`. */ public final class test_typedefs_in_templates { private test_typedefs_in_templates() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java index 615be225..65430f60 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_using_decls.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_using_decls`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_using_decls`. */ public final class test_using_decls { private test_using_decls() {} @@ -36,5 +36,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_GetMutable_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_GetMutable_StaticVar", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Set_StaticVar = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Set_StaticVar", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_Destroy = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A = mrbind_test.Ffi.downcall("", "MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java index 3c3aae29..97fc13c5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/MR/test_variant.java @@ -1,6 +1,6 @@ package mrbind_test.ffi.MR; -/** The downcall handles of the C bindings file `MR/test_variant`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `MR/test_variant`. */ public final class test_variant { private test_variant() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java index 1af4cd30..6a3b207f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/iostream.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `iostream`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `iostream`. */ public final class iostream { private iostream() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java index 7a31ffe6..9f9b2230 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_map_int_float`. */ public final class phmap_btree_map_int_float { private phmap_btree_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java index baa503ea..cfb57924 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multimap_int_float`. */ public final class phmap_btree_multimap_int_float { private phmap_btree_multimap_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java index 75986dae..d4b178fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_multiset_int`. */ public final class phmap_btree_multiset_int { private phmap_btree_multiset_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java index 5baf0fe1..d757cff6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_btree_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_btree_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_btree_set_int`. */ public final class phmap_btree_set_int { private phmap_btree_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java index 5749e1a5..08f9e324 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_map_int_float`. */ public final class phmap_flat_hash_map_int_float { private phmap_flat_hash_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java index 6d89a195..61ef70a8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_flat_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_flat_hash_set_int`. */ public final class phmap_flat_hash_set_int { private phmap_flat_hash_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java index f1cd0c37..6f7a4b4d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_map_int_float`. */ public final class phmap_node_hash_map_int_float { private phmap_node_hash_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java index df37c4b0..37c3d7cd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_node_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_node_hash_set_int`. */ public final class phmap_node_hash_set_int { private phmap_node_hash_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java index b33d014d..f2647cfe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_map_int_float`. */ public final class phmap_parallel_flat_hash_map_int_float { private phmap_parallel_flat_hash_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java index fb82294c..ad7f8e0e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_flat_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_flat_hash_set_int`. */ public final class phmap_parallel_flat_hash_set_int { private phmap_parallel_flat_hash_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java index 591d728e..5a0646eb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_map_int_float`. */ public final class phmap_parallel_node_hash_map_int_float { private phmap_parallel_node_hash_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java index 408c9d3b..19af44c7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/phmap_parallel_node_hash_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `phmap_parallel_node_hash_set_int`. */ public final class phmap_parallel_node_hash_set_int { private phmap_parallel_node_hash_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java index 5cc3ac9a..abf67648 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_A_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_A_42`. */ public final class std_array_MR_StdContainers_A_42 { private std_array_MR_StdContainers_A_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java index db4ef900..f60b8bd9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_MR_StdContainers_NonAssignable_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_MR_StdContainers_NonAssignable_42`. */ public final class std_array_MR_StdContainers_NonAssignable_42 { private std_array_MR_StdContainers_NonAssignable_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java index 3706ce9b..fd04e97c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_43.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int_43`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int_43`. */ public final class std_array_int_43 { private std_array_int_43() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java index 0fc9823b..dd711b89 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_array_int_array_4_array_3_5.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_array_int_array_4_array_3_5`. */ public final class std_array_int_array_4_array_3_5 { private std_array_int_array_4_array_3_5() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java index 5311eb69..6d9c4748 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_MR_StdContainers_NonAssignable`. */ public final class std_deque_MR_StdContainers_NonAssignable { private std_deque_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java index ecc84603..bc47f784 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_deque_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_deque_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_deque_int`. */ public final class std_deque_int { private std_deque_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java index 6ddf0f45..f36233ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_E1_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_E1_float`. */ public final class std_expected_MR_CSharp_E1_float { private std_expected_MR_CSharp_E1_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java index b2cc94ec..07834cce 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayoutSh_float`. */ public final class std_expected_MR_CSharp_ExposedLayoutSh_float { private std_expected_MR_CSharp_ExposedLayoutSh_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java index 6c783919..06418ef3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_ExposedLayout_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_ExposedLayout_float`. */ public final class std_expected_MR_CSharp_ExposedLayout_float { private std_expected_MR_CSharp_ExposedLayout_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java index 6999846a..11d4688d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_NonTrivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_NonTrivial_float`. */ public final class std_expected_MR_CSharp_NonTrivial_float { private std_expected_MR_CSharp_NonTrivial_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java index 4e81dd0c..81e49b6b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_SA_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_SA_float`. */ public final class std_expected_MR_CSharp_SA_float { private std_expected_MR_CSharp_SA_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java index 1bf16ecc..89e02838 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_MR_CSharp_Trivial_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_MR_CSharp_Trivial_float`. */ public final class std_expected_MR_CSharp_Trivial_float { private std_expected_MR_CSharp_Trivial_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java index 92511daf..a7ce53bb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_int_float`. */ public final class std_expected_int_float { private std_expected_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java index c090621f..5bc432a6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_int_std_string`. */ public final class std_expected_int_std_string { private std_expected_int_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java index 14680621..5956bf88 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_expected_void_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_expected_void_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_expected_void_float`. */ public final class std_expected_void_float { private std_expected_void_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java index 8c29e384..eeb4a594 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_filesystem_path.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_filesystem_path`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_filesystem_path`. */ public final class std_filesystem_path { private std_filesystem_path() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index bba6c24a..906da660 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_E1_from_MR_CSharp_E1`. */ public final class std_function_MR_CSharp_E1_from_MR_CSharp_E1 { private std_function_MR_CSharp_E1_from_MR_CSharp_E1() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index 0ff77b94..8bed5155 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC`. */ public final class std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC { private std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java index e64172e5..9d3583fc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_A`. */ public final class std_function_MR_StdFunction_A { private std_function_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java index c1e4eb48..f82513c0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_MR_StdFunction_E_from_int_MR_StdFunction_E`. */ public final class std_function_MR_StdFunction_E_from_int_MR_StdFunction_E { private std_function_MR_StdFunction_E_from_int_MR_StdFunction_E() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java index 79b0745d..b99a0602 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int`. */ public final class std_function_int { private std_function_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java index 1e6eb1a5..eb7038ed 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_from_int_int`. */ public final class std_function_int_from_int_int { private std_function_int_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java index 607bff92..3b3a2717 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_from_std_string`. */ public final class std_function_int_from_std_string { private std_function_int_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java index d62144de..3a4a10d6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_ref_from_int_ref_int_rvalue_ref`. */ public final class std_function_int_ref_from_int_ref_int_rvalue_ref { private std_function_int_ref_from_int_ref_int_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java index cc8574a7..92602f42 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_int_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_int_rvalue_ref`. */ public final class std_function_int_rvalue_ref { private std_function_int_rvalue_ref() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_int_rvalue_ref_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_int_rvalue_ref_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java index 4a5fc957..b0f239d1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int_float`. */ public final class std_function_std_string_from_int_float { private std_function_std_string_from_int_float() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_float_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_float_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java index a2a98cdc..d3299453 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_std_string_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_std_string_from_int_int`. */ public final class std_function_std_string_from_int_int { private std_function_std_string_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_std_string_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_std_string_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java index ebfa3a4f..b2be91d1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void`. */ public final class std_function_void { private std_function_void() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java index 2e84d3df..31e86a6c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_MR_StdFunction_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_MR_StdFunction_A`. */ public final class std_function_void_from_MR_StdFunction_A { private std_function_void_from_MR_StdFunction_A() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_MR_StdFunction_A_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_MR_StdFunction_A_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java index b3b475de..13fc74fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_int_int`. */ public final class std_function_void_from_int_int { private std_function_void_from_int_int() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_int_int_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_int_int_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java index f461d793..3b6161ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_function_void_from_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_function_void_from_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_function_void_from_std_string`. */ public final class std_function_void_from_std_string { private std_function_void_from_std_string() {} @@ -16,5 +16,7 @@ private H0() {} public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_reset = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_reset", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_call = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_Destroy = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_Destroy", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_ConstructEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_ConstructEx", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + public static final java.lang.invoke.MethodHandle MR_C_std_function_void_from_std_string_AssignEx = mrbind_test.Ffi.downcall("", "MR_C_std_function_void_from_std_string_AssignEx", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java index 68c6eaea..6f238a58 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_MR_StdContainers_NonAssignable`. */ public final class std_list_MR_StdContainers_NonAssignable { private std_list_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java index 78865bfd..80aeb0e6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_list_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_list_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_list_int`. */ public final class std_list_int { private std_list_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java index 5621fc6f..b2b9a292 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_MR_StdContainers_NonAssignable_float`. */ public final class std_map_MR_StdContainers_NonAssignable_float { private std_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java index 1654ccdc..87b9eb08 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_map_int_float`. */ public final class std_map_int_float { private std_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java index 722ad6f8..56ecec09 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_multimap_MR_StdContainers_NonAssignable_float { private std_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java index 355b2582..51c5e679 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multimap_int_float`. */ public final class std_multimap_int_float { private std_multimap_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java index 1a02113a..314caf03 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_MR_StdContainers_NonAssignable`. */ public final class std_multiset_MR_StdContainers_NonAssignable { private std_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java index 386a415d..4fa3463f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_float`. */ public final class std_multiset_float { private std_multiset_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java index 5e0f7360..f48b4e3a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_multiset_int`. */ public final class std_multiset_int { private std_multiset_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java index 2e391f50..b6ac1fd1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_ExposedLayoutSh`. */ public final class std_optional_MR_CSharp_ExposedLayoutSh { private std_optional_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java index 10bee38b..15cae432 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_NonTrivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_NonTrivial`. */ public final class std_optional_MR_CSharp_NonTrivial { private std_optional_MR_CSharp_NonTrivial() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java index 13ff2ba8..3282e9d2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_SA`. */ public final class std_optional_MR_CSharp_SA { private std_optional_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java index cde44112..a4186168 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_CSharp_Trivial.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_CSharp_Trivial`. */ public final class std_optional_MR_CSharp_Trivial { private std_optional_MR_CSharp_Trivial() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java index 41f59d25..2c7ec0ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_A`. */ public final class std_optional_MR_StdOptional_A { private std_optional_MR_StdOptional_A() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java index f091760c..ee11b710 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_B.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_B`. */ public final class std_optional_MR_StdOptional_B { private std_optional_MR_StdOptional_B() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java index 26c2b8ea..b339627b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_MR_StdOptional_E.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_MR_StdOptional_E`. */ public final class std_optional_MR_StdOptional_E { private std_optional_MR_StdOptional_E() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java index f64b40a1..d70ac82e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_int`. */ public final class std_optional_int { private std_optional_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java index 7420f29f..5ea915b4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_optional_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_optional_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_optional_std_string`. */ public final class std_optional_std_string { private std_optional_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java index 88f72999..9a6495e0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_MR_StdContainers_NonAssignable_float`. */ public final class std_pair_const_MR_StdContainers_NonAssignable_float { private std_pair_const_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java index 34eea1e7..5656eb09 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_float`. */ public final class std_pair_const_int_float { private std_pair_const_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java index 0db03228..00c7ce70 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_ref_const_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_ref_const_float_ref`. */ public final class std_pair_const_int_ref_const_float_ref { private std_pair_const_int_ref_const_float_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java index c5c1d6eb..08547589 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_const_int_rvalue_ref_const_float_rvalue_ref`. */ public final class std_pair_const_int_rvalue_ref_const_float_rvalue_ref { private std_pair_const_int_rvalue_ref_const_float_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java index baf401b2..1a1ad1c2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_float`. */ public final class std_pair_int_float { private std_pair_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java index b31e0d02..38392a76 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_ref_float_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_ref_float_ref`. */ public final class std_pair_int_ref_float_ref { private std_pair_int_ref_float_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java index ad8b8edf..677b84ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_rvalue_ref_float_rvalue_ref`. */ public final class std_pair_int_rvalue_ref_float_rvalue_ref { private std_pair_int_rvalue_ref_float_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java index 5c6bdcdf..b1da301a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_pair_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_pair_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_pair_int_std_string`. */ public final class std_pair_int_std_string { private std_pair_int_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java index 57a1ce96..1263684d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_MR_StdContainers_NonAssignable`. */ public final class std_set_MR_StdContainers_NonAssignable { private std_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java index 47712d97..95c94dc8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_float`. */ public final class std_set_float { private std_set_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java index d43ec702..3145d379 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_set_int`. */ public final class std_set_int { private std_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java index aae58f97..dbc896b8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_ExposedLayoutSh`. */ public final class std_shared_ptr_MR_CSharp_ExposedLayoutSh { private std_shared_ptr_MR_CSharp_ExposedLayoutSh() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java index c17dc3ec..cccfe2cb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SA`. */ public final class std_shared_ptr_MR_CSharp_SA { private std_shared_ptr_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java index 1b41d567..a60b7b5b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SB`. */ public final class std_shared_ptr_MR_CSharp_SB { private std_shared_ptr_MR_CSharp_SB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java index 036cfd40..84718b15 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SC.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SC`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SC`. */ public final class std_shared_ptr_MR_CSharp_SC { private std_shared_ptr_MR_CSharp_SC() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java index 08c029bf..25087115 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SD.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SD`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SD`. */ public final class std_shared_ptr_MR_CSharp_SD { private std_shared_ptr_MR_CSharp_SD() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java index 5dcf8ce6..274d1a0d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SE.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SE`. */ public final class std_shared_ptr_MR_CSharp_SE { private std_shared_ptr_MR_CSharp_SE() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java index 6623e802..3c394905 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SF.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SF`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SF`. */ public final class std_shared_ptr_MR_CSharp_SF { private std_shared_ptr_MR_CSharp_SF() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java index 00f8de85..79cc6ffd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CSharp_SG.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CSharp_SG`. */ public final class std_shared_ptr_MR_CSharp_SG { private std_shared_ptr_MR_CSharp_SG() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java index a1b6747e..19805dd4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_CommonBaseAB.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_CommonBaseAB`. */ public final class std_shared_ptr_MR_CommonBaseAB { private std_shared_ptr_MR_CommonBaseAB() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java index d476159b..cb1ba328 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_MR_StdSharedPtr_A { private std_shared_ptr_MR_StdSharedPtr_A() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java index 8ddc8375..bc74688d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array { private std_shared_ptr_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java index 33a54a0a..8af41b39 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java index cf59e707..98d5526b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_CSharp_SA.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_CSharp_SA`. */ public final class std_shared_ptr_const_MR_CSharp_SA { private std_shared_ptr_const_MR_CSharp_SA() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java index 3709e4fe..20832f16 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A { private std_shared_ptr_const_MR_StdSharedPtr_A() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java index 7fdac6d8..ff6f8f39 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array { private std_shared_ptr_const_MR_StdSharedPtr_A_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java index 6326b139..1a9103ba 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_MR_StdSharedPtr_A_array_42`. */ public final class std_shared_ptr_const_MR_StdSharedPtr_A_array_42 { private std_shared_ptr_const_MR_StdSharedPtr_A_array_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java index 5bcd37f5..1c03b1a4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int`. */ public final class std_shared_ptr_const_int { private std_shared_ptr_const_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java index 64626f17..dd077da1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array`. */ public final class std_shared_ptr_const_int_array { private std_shared_ptr_const_int_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java index b9725acd..7b0b77d8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_int_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_int_array_42`. */ public final class std_shared_ptr_const_int_array_42 { private std_shared_ptr_const_int_array_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java index 7aa5bde9..fc26ab1a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_const_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_const_void`. */ public final class std_shared_ptr_const_void { private std_shared_ptr_const_void() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java index 49f4c1f5..14953c19 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int`. */ public final class std_shared_ptr_int { private std_shared_ptr_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java index 826444ba..a9f0271f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int_array`. */ public final class std_shared_ptr_int_array { private std_shared_ptr_int_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java index 1591a556..2887abfd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_int_array_42.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_int_array_42`. */ public final class std_shared_ptr_int_array_42 { private std_shared_ptr_int_array_42() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java index e4de6a56..aa5ddfb3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_shared_ptr_void.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_shared_ptr_void`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_shared_ptr_void`. */ public final class std_shared_ptr_void { private std_shared_ptr_void() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java index 4e0bdf26..be5b9c6e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string`. */ public final class std_string { private std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java index 00e81830..77b66045 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_string_view.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_string_view`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_string_view`. */ public final class std_string_view { private std_string_view() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java index 8cbe446e..336ea3bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple`. */ public final class std_tuple { private std_tuple() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java index 8133ed79..c0356ab6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout`. */ public final class std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout { private std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java index b4af3042..97fb581a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref { private std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java index 4014137c..4764212a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref`. */ public final class std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref { private std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java index c9d6cd51..743c7ec5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd`. */ public final class std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd { private std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java index 2570ee74..5e31e992 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref`. */ public final class std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref { private std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java index c6fd9ca9..a371e80d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_const_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_const_int_std_string`. */ public final class std_tuple_const_int_std_string { private std_tuple_const_int_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java index 101e096b..850b5d53 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_float_double_int_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_float_double_int_int`. */ public final class std_tuple_float_double_int_int { private std_tuple_float_double_int_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java index cf2a96b2..378ae9f1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int`. */ public final class std_tuple_int { private std_tuple_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java index ff640e11..6be24221 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_float`. */ public final class std_tuple_int_float { private std_tuple_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java index cfe25e86..90a276f0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref`. */ public final class std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref { private std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java index 230f58d7..18c7fb3e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_tuple_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_tuple_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_tuple_int_std_string`. */ public final class std_tuple_int_std_string { private std_tuple_int_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java index 5b7a55ab..78817e69 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A`. */ public final class std_unique_ptr_MR_StdUniquePtr_A { private std_unique_ptr_MR_StdUniquePtr_A() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java index 86f55711..49d7c0d2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_MR_StdUniquePtr_A_array`. */ public final class std_unique_ptr_MR_StdUniquePtr_A_array { private std_unique_ptr_MR_StdUniquePtr_A_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java index 8faaa5e3..627943b1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int`. */ public final class std_unique_ptr_int { private std_unique_ptr_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java index 923576b1..4792ec2b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unique_ptr_int_array.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unique_ptr_int_array`. */ public final class std_unique_ptr_int_array { private std_unique_ptr_int_array() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java index 4b9cd7ac..c66b1bdd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_map_MR_StdContainers_NonAssignable_float { private std_unordered_map_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java index 489ca3d2..5197e968 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_map_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_map_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_map_int_float`. */ public final class std_unordered_map_int_float { private std_unordered_map_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java index 805d3ea0..1f41462b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_MR_StdContainers_NonAssignable_float`. */ public final class std_unordered_multimap_MR_StdContainers_NonAssignable_float { private std_unordered_multimap_MR_StdContainers_NonAssignable_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java index 6a18e1d0..f538edbc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multimap_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multimap_int_float`. */ public final class std_unordered_multimap_int_float { private std_unordered_multimap_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java index c33c45fd..5aed4634 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_MR_StdContainers_NonAssignable`. */ public final class std_unordered_multiset_MR_StdContainers_NonAssignable { private std_unordered_multiset_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java index cdd37291..f03eb910 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_multiset_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_multiset_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_multiset_int`. */ public final class std_unordered_multiset_int { private std_unordered_multiset_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java index b6f73a1c..05948578 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_MR_StdContainers_NonAssignable`. */ public final class std_unordered_set_MR_StdContainers_NonAssignable { private std_unordered_set_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java index e6f1889c..cc6f5b1f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_unordered_set_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_unordered_set_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_unordered_set_int`. */ public final class std_unordered_set_int { private std_unordered_set_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java index aa5dac23..db2104c9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float`. */ public final class std_variant_int_float { private std_variant_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java index b81afbd9..2f233c54 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float_float`. */ public final class std_variant_int_float_float { private std_variant_int_float_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java index 9c223896..efd501e3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_int_float_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_int_float_std_string`. */ public final class std_variant_int_float_std_string { private std_variant_int_float_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java index 172250fe..29ef947c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float`. */ public final class std_variant_std_monostate_int_float { private std_variant_std_monostate_int_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java index c34cf2ca..1e87dd24 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_variant_std_monostate_int_float_float.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_variant_std_monostate_int_float_float`. */ public final class std_variant_std_monostate_int_float_float { private std_variant_std_monostate_int_float_float() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java index a4e51525..79f6018a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_A.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_A`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_A`. */ public final class std_vector_MR_A { private std_vector_MR_A() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java index f79d0158..eb25b044 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_A_ptr`. */ public final class std_vector_MR_CSharp_A_ptr { private std_vector_MR_CSharp_A_ptr() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java index 7bd0bb53..cd63cb4b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_CSharp_ExposedLayout.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_CSharp_ExposedLayout`. */ public final class std_vector_MR_CSharp_ExposedLayout { private std_vector_MR_CSharp_ExposedLayout() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java index d347fddd..704835c9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonAssignable.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonAssignable`. */ public final class std_vector_MR_StdContainers_NonAssignable { private std_vector_MR_StdContainers_NonAssignable() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java index 529230bb..94d8fa56 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_MR_StdContainers_NonDefaultConstructible`. */ public final class std_vector_MR_StdContainers_NonDefaultConstructible { private std_vector_MR_StdContainers_NonDefaultConstructible() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java index f8a752ed..70b1b304 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_const_MR_CSharp_A_ptr.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_const_MR_CSharp_A_ptr`. */ public final class std_vector_const_MR_CSharp_A_ptr { private std_vector_const_MR_CSharp_A_ptr() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java index 71acac26..5c8bef1d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_int`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_int`. */ public final class std_vector_int { private std_vector_int() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java index 02ded0de..5400a8f1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_int64_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_int64_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_int64_t`. */ public final class std_vector_int64_t { private std_vector_int64_t() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java index 6d671f05..f3ba497b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_std_expected_int_std_string.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_std_expected_int_std_string`. */ public final class std_vector_std_expected_int_std_string { private std_vector_std_expected_int_std_string() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java index cf72279e..86a7b033 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/ffi/std_vector_uint64_t.java @@ -1,6 +1,6 @@ package mrbind_test.ffi; -/** The downcall handles of the C bindings file `std_vector_uint64_t`. Generated by mrbind, do not edit. */ +/** The downcall handles of the C bindings file `std_vector_uint64_t`. */ public final class std_vector_uint64_t { private std_vector_uint64_t() {} diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java index 0e7b8b0e..c525dc14 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.A assignFromAnother(mrbind_test.mr.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.cs.std_string x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void setX(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR._1.H0.MR_A_Set_x.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java index 15628025..651602c6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/CommonBaseAB.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ public mrbind_test.mr.CommonBaseAB assignFromAnother(mrbind_test.mr.CommonBaseAB try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java index 42a7a99a..28ed7490 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_vector_MR_A foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR._1.H0.MR_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.cs.std_vector_MR_A _1) try { mrbind_test.ffi.MR._1.H0.MR_bar.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -56,6 +58,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB mark_shared_commo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB_base.ab_base.H0.MR_mark_shared_common_base_ab.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -74,6 +77,7 @@ public static mrbind_test.mr.cs.std_vector_MR_SeparateA GetSeparateVecA() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_GetSeparateVecA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -92,6 +96,7 @@ public static mrbind_test.mr.cs.std_vector_MR_SeparateB GetSeparateVecB() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_GetSeparateVecB.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -110,6 +115,7 @@ public static mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB Ge try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_combined_a_b.H0.MR_GetCombinedVecAB.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java index a642c4fb..6d96c068 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateA.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateA assignFromAnother(mrbind_test.mr.SeparateA _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateA`. The result refers to `object`. + * + * Calls `MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateA dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.A.a.H0.MR_SeparateA_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java index 860759b4..0540f87b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/SeparateB.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -78,4 +80,64 @@ public mrbind_test.mr.SeparateB assignFromAnother(mrbind_test.mr.SeparateB _othe java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CommonBaseAB`. The result refers to this object. + * + * Calls `MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB()`. */ + public mrbind_test.mr.CommonBaseAB upcastToCommonBaseAB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableUpcastTo_MR_CommonBaseAB.invokeExact(rawPointer()); + return new mrbind_test.mr.CommonBaseAB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CommonBaseAB`. Undefined behavior if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB staticDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableStaticDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CommonBaseAB`. Returns null if the object isn't actually a `SeparateB`. The result refers to `object`. + * + * Calls `MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB()`. */ + public static mrbind_test.mr.SeparateB dynamicDowncastFromCommonBaseAB(mrbind_test.mr.CommonBaseAB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.B.b.H0.MR_SeparateB_MutableDynamicDowncastFrom_MR_CommonBaseAB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java index 67833c53..a55dd2c6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/A.java @@ -21,6 +21,7 @@ public void foo() try { mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java index 14d768cc..e35d3ed0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/B.java @@ -36,6 +36,7 @@ public void foo() try { mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_B_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java index 5712633a..536ba196 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/abstractclasses/C.java @@ -36,6 +36,7 @@ public void foo() try { mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -46,4 +47,64 @@ public void foo() java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::AbstractClasses::B`. The result refers to this object. + * + * Calls `MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B()`. */ + public mrbind_test.mr.abstractclasses.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableUpcastTo_MR_AbstractClasses_B.invokeExact(rawPointer()); + return new mrbind_test.mr.abstractclasses.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::AbstractClasses::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C staticDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableStaticDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::AbstractClasses::B`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B()`. */ + public static mrbind_test.mr.abstractclasses.C dynamicDowncastFromB(mrbind_test.mr.abstractclasses.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_abstract_classes.H0.MR_AbstractClasses_C_MutableDynamicDowncastFrom_MR_AbstractClasses_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.abstractclasses.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java index dd8b19b6..18e21c69 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/A.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public long convertTo_uint64_t() try { long __ret = (long)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_ConvertTo_uint64_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.adjustingnames.A assignFromAnother(mrbind_test.mr.adjustin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.adjustingnames.A(__ret, false, __owner); } @@ -133,6 +137,7 @@ public void foo() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -154,6 +159,7 @@ public void bar() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +181,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Get_var_uint64_t.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -194,6 +201,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_A_Set_var_uint64_t.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java index 9c07a3d2..49732040 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/adjustingnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.adjustingnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -18,6 +18,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void bar() try { mrbind_test.ffi.MR.test_adjusting_names.H0.MR_AdjustingNames_bar.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java index 8cddd608..4dd5db2a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/A.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x, java. { java.lang.foreign.MemorySegment __str_y = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(y, "y")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFrom.invokeExact(x, __str_y, mrbind_test.Ffi.end(__str_y)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public mrbind_test.mr.aggregates.A assignFromAnother(mrbind_test.mr.aggregates.A try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.A(__ret, false, __owner); } @@ -137,6 +141,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -159,6 +164,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -181,6 +187,7 @@ public mrbind_test.mr.cs.std_string y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -206,6 +213,7 @@ public void setY(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_A_Set_y.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java index 1dbcbb83..fa2565ef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/B.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.aggregates.B assignFromAnother(mrbind_test.mr.aggregates.B try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java index 76e0b102..5698c344 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.aggregates.C assignFromAnother(mrbind_test.mr.aggregates.C try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.C(__ret, false, __owner); } @@ -134,6 +138,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -222,6 +230,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -288,6 +299,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -310,6 +322,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -354,6 +368,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -376,6 +391,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -398,6 +414,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -420,6 +437,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -442,6 +460,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -464,6 +483,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_C_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java index 03f7c1fe..0934c0a2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/D.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.aggregates.D assignFromAnother(mrbind_test.mr.aggregates.D try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.D(__ret, false, __owner); } @@ -133,6 +137,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -177,6 +183,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -221,6 +229,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -265,6 +275,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -309,6 +321,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -331,6 +344,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -353,6 +367,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -375,6 +390,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -397,6 +413,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -419,6 +436,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -441,6 +459,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -463,6 +482,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -485,6 +505,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_D_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java index e2ad0596..9dc267ed 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/E.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int a, int b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_ConstructFrom.invokeExact(a, b, c, d, e, f, g, h, i, mrbind_test.Ffi.ptrNonNull(j, "j")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.aggregates.E assignFromAnother(mrbind_test.mr.aggregates.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.E(__ret, false, __owner); } @@ -116,6 +119,7 @@ public int a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -139,6 +143,7 @@ public void setA(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -162,6 +167,7 @@ public int b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -185,6 +191,7 @@ public void setB(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_b.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -208,6 +215,7 @@ public int c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -231,6 +239,7 @@ public void setC(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_c.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -254,6 +263,7 @@ public int d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -277,6 +287,7 @@ public void setD(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_d.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -300,6 +311,7 @@ public int e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -323,6 +335,7 @@ public void setE(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_e.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -346,6 +359,7 @@ public int f() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_f.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -369,6 +383,7 @@ public void setF(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_f.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +407,7 @@ public int g() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_g.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -415,6 +431,7 @@ public void setG(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_g.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -438,6 +455,7 @@ public int h() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_h.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -461,6 +479,7 @@ public void setH(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_h.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -484,6 +503,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -507,6 +527,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -530,6 +551,7 @@ public mrbind_test.mr.aggregates.NonDefaultConstructible j() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Get_j.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); } @@ -555,6 +577,7 @@ public void setJ(mrbind_test.mr.aggregates.NonDefaultConstructible value) try { mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_E_Set_j.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java index 2c1975e4..519a6f4d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/aggregates/NonDefaultConstructible.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public mrbind_test.mr.aggregates.NonDefaultConstructible assignFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_aggregates.H0.MR_Aggregates_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.aggregates.NonDefaultConstructible(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java index a100b584..90d91fef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/A.java @@ -51,6 +51,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -75,6 +76,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -98,6 +100,7 @@ public mrbind_test.mr.bases.A assignFromAnother(mrbind_test.mr.bases.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java index 396fb8d5..d46a312d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.B(__ret, false, __owner); } @@ -107,4 +110,44 @@ public mrbind_test.mr.bases.B assignFromAnother(mrbind_test.mr.bases.B _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java index 5e992aa0..04210068 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/B2.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.B2(__ret, false, __owner); } @@ -103,4 +106,84 @@ public mrbind_test.mr.bases.B2 assignFromAnother(mrbind_test.mr.bases.B2 _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::Bases::B`. The result refers to this object. + * + * Calls `MR_Bases_B2_MutableUpcastTo_MR_Bases_B()`. */ + public mrbind_test.mr.bases.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableUpcastTo_MR_Bases_B.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::B`. Undefined behavior if the object isn't actually a `B2`. The result refers to `object`. + * + * Calls `MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B()`. */ + public static mrbind_test.mr.bases.B2 staticDowncastFromB(mrbind_test.mr.bases.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_B2_MutableStaticDowncastFrom_MR_Bases_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.B2(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java index a7d62d1c..a8d4ec07 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/C.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.C(__ret, false, __owner); } @@ -104,4 +107,44 @@ public mrbind_test.mr.bases.C assignFromAnother(mrbind_test.mr.bases.C _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_C_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.C staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_C_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java index 31d7a8b3..8d5bf1eb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.D assignFromAnother(mrbind_test.mr.bases.D _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java index 75d36cd7..5bff36d9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D2.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.D2 assignFromAnother(mrbind_test.mr.bases.D2 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D2_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D2(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java index e8f31dbb..200c7d58 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/D3.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.D3 assignFromAnother(mrbind_test.mr.bases.D3 _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_D3_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.D3(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java index fd4f95ab..f48fb98c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/E.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.bases.E assignFromAnother(mrbind_test.mr.bases.E _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.E(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java index 1fb06238..81ce9f6f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/F.java @@ -46,6 +46,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.F(__ret, false, __owner); } @@ -106,4 +109,44 @@ public mrbind_test.mr.bases.F assignFromAnother(mrbind_test.mr.bases.F _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_F_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E()`. */ + public static mrbind_test.mr.bases.F staticDowncastFromE(mrbind_test.mr.bases.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_F_MutableStaticDowncastFrom_MR_Bases_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java index 22ddd4d1..a0cbdaf8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/G.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.G(__ret, false, __owner); } @@ -103,4 +106,44 @@ public mrbind_test.mr.bases.G assignFromAnother(mrbind_test.mr.bases.G _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_G_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_G_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java index 201dfda9..135e73e7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/H.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.H(__ret, false, __owner); } @@ -105,4 +108,84 @@ public mrbind_test.mr.bases.H assignFromAnother(mrbind_test.mr.bases.H _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_H_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::Bases::A`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A()`. */ + public static mrbind_test.mr.bases.H staticDowncastFromA(mrbind_test.mr.bases.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_H_MutableStaticDowncastFrom_MR_Bases_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.bases.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java index b4c1d375..c6211ec0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/bases/I.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.bases.I(__ret, false, __owner); } @@ -104,4 +107,64 @@ public mrbind_test.mr.bases.I assignFromAnother(mrbind_test.mr.bases.I _other) java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::Bases::E`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_E()`. */ + public mrbind_test.mr.bases.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_E.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::F`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_F()`. */ + public mrbind_test.mr.bases.F upcastToF() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_F.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.F(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::Bases::A`. The result refers to this object. + * + * Calls `MR_Bases_I_MutableUpcastTo_MR_Bases_A()`. */ + public mrbind_test.mr.bases.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_bases.H0.MR_Bases_I_MutableUpcastTo_MR_Bases_A.invokeExact(rawPointer()); + return new mrbind_test.mr.bases.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java index 447c528d..5760a6a2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/convops/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -84,6 +86,7 @@ public boolean convertTo_bool() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_ConvertTo_bool.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public mrbind_test.mr.convops.A assignFromAnother(mrbind_test.mr.convops.A _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_conv_ops.H0.MR_ConvOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.convops.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java index b861127d..7878f307 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/A.java @@ -55,6 +55,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -78,6 +79,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -102,6 +104,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -124,6 +127,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -147,6 +151,7 @@ public mrbind_test.mr.copyinheritedmembers.A assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, __owner); } @@ -171,6 +176,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -192,6 +198,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -209,6 +216,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -227,6 +235,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -245,6 +254,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -267,6 +277,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java index b7fdff64..4ea2c288 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/B.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int Field) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFrom.invokeExact(Field); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -137,6 +141,7 @@ public mrbind_test.mr.copyinheritedmembers.B assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, __owner); } @@ -161,6 +166,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -182,6 +188,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -217,6 +225,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -235,6 +244,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -257,6 +267,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_B_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java index 012b1910..06120dd8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/C.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, __owner); } @@ -102,4 +105,84 @@ public mrbind_test.mr.copyinheritedmembers.C assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.C staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_C_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java index c365bde3..be5c2553 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/D.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public mrbind_test.mr.copyinheritedmembers.D assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, __owner); } @@ -138,6 +142,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -159,6 +164,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -194,6 +201,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -212,6 +220,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -234,6 +243,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -244,4 +254,44 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `D`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.D staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_D_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java index a7c27e18..79b2d076 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/E.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, __owner); } @@ -104,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.E assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `E`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.E staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_E_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.E(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java index 0bf68086..e5d2d3e6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/F.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, __owner); } @@ -104,4 +107,124 @@ public mrbind_test.mr.copyinheritedmembers.F assignFromAnother(mrbind_test.mr.co java.lang.ref.Reference.reachabilityFence(_other); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::B`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B()`. */ + public mrbind_test.mr.copyinheritedmembers.B upcastToB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_B.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.B(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::B`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromB(mrbind_test.mr.copyinheritedmembers.B object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_B.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::D`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D()`. */ + public mrbind_test.mr.copyinheritedmembers.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_D.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromD(mrbind_test.mr.copyinheritedmembers.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.F staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_F_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java index fa0f297d..824300f1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/G.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -116,6 +119,7 @@ public mrbind_test.mr.copyinheritedmembers.G assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, __owner); } @@ -140,6 +144,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +166,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,6 +222,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -236,6 +245,27 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_G_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java index 494edd54..ea4b3ce8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/H.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public mrbind_test.mr.copyinheritedmembers.H assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -157,6 +162,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -174,6 +180,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -192,6 +199,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -210,6 +218,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -232,6 +241,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,4 +252,64 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `H`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.H staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_H_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.H(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java index 39d61d32..0b575e39 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/I.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public mrbind_test.mr.copyinheritedmembers.I assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -157,6 +162,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -174,6 +180,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -192,6 +199,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -210,6 +218,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -232,6 +241,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,4 +252,64 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::G`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G()`. */ + public mrbind_test.mr.copyinheritedmembers.G upcastToG() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableUpcastTo_MR_CopyInheritedMembers_G.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.G(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::G`. Undefined behavior if the object isn't actually a `I`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G()`. */ + public static mrbind_test.mr.copyinheritedmembers.I staticDowncastFromG(mrbind_test.mr.copyinheritedmembers.G object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_I_MutableStaticDowncastFrom_MR_CopyInheritedMembers_G.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.I(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java index d361cc7b..93b7c3d2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/J.java @@ -49,6 +49,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -73,6 +74,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -95,6 +97,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -118,6 +121,7 @@ public mrbind_test.mr.copyinheritedmembers.J assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, __owner); } @@ -142,6 +146,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +168,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -180,6 +186,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -238,6 +247,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -248,4 +258,44 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::A`. Undefined behavior if the object isn't actually a `J`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A()`. */ + public static mrbind_test.mr.copyinheritedmembers.J staticDowncastFromA(mrbind_test.mr.copyinheritedmembers.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_J_MutableStaticDowncastFrom_MR_CopyInheritedMembers_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java index 3230b2ca..7134f071 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/K.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.K assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_K_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.K(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java index 5cc2c84f..58b3e2a5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/L.java @@ -44,6 +44,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.copyinheritedmembers.L assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_L_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.L(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java index 9f7d509d..574eee03 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/M.java @@ -49,6 +49,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -73,6 +74,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -95,6 +97,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -118,6 +121,7 @@ public mrbind_test.mr.copyinheritedmembers.M assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, __owner); } @@ -142,6 +146,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +168,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -180,6 +186,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -238,6 +247,47 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_M_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java index fc81cb22..07aa1002 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/N.java @@ -48,6 +48,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -72,6 +73,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -94,6 +96,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -117,6 +120,7 @@ public mrbind_test.mr.copyinheritedmembers.N assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, __owner); } @@ -141,6 +145,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -162,6 +167,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,4 +257,84 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `N`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.N staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_N_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java index 1e9489ed..5fb9ca1d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/copyinheritedmembers/O.java @@ -47,6 +47,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -116,6 +119,7 @@ public mrbind_test.mr.copyinheritedmembers.O assignFromAnother(mrbind_test.mr.co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, __owner); } @@ -140,6 +144,7 @@ public void Method() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +166,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public static int StaticField() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_StaticField.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public static void setStaticField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_StaticField.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,6 +222,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -236,6 +245,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -246,4 +256,124 @@ public void setField(int value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CopyInheritedMembers::A`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A()`. */ + public mrbind_test.mr.copyinheritedmembers.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_A.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::J`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J()`. */ + public mrbind_test.mr.copyinheritedmembers.J upcastToJ() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_J.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.J(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::M`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M()`. */ + public mrbind_test.mr.copyinheritedmembers.M upcastToM() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_M.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.M(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::M`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromM(mrbind_test.mr.copyinheritedmembers.M object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_M.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CopyInheritedMembers::N`. The result refers to this object. + * + * Calls `MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N()`. */ + public mrbind_test.mr.copyinheritedmembers.N upcastToN() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableUpcastTo_MR_CopyInheritedMembers_N.invokeExact(rawPointer()); + return new mrbind_test.mr.copyinheritedmembers.N(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CopyInheritedMembers::N`. Undefined behavior if the object isn't actually a `O`. The result refers to `object`. + * + * Calls `MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N()`. */ + public static mrbind_test.mr.copyinheritedmembers.O staticDowncastFromN(mrbind_test.mr.copyinheritedmembers.N object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_copy_inherited_members.H0.MR_CopyInheritedMembers_O_MutableStaticDowncastFrom_MR_CopyInheritedMembers_N.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.copyinheritedmembers.O(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java index d54d8b08..ba9d1fb8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.cs; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a, mrb try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -39,6 +40,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_const_iterator a try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +64,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbind_te try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_sub_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +88,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_A_iterator a, mrbi try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_equal_MR_C_std_vector_MR_A_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +112,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterato try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +136,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_it try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +160,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator a, m try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_sub_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +184,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_equal_MR_C_std_vector_MR_SeparateA_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +208,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterato try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -223,6 +232,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_it try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +256,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator a, m try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -269,6 +280,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -292,6 +304,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_S try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +328,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +352,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_S try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_sub_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -361,6 +376,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_equal_MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -384,6 +400,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_co try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -407,6 +424,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -430,6 +448,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_it try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -453,6 +472,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_ExposedLayout_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -476,6 +496,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdCout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCout.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -495,6 +516,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdCerr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCerr.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -514,6 +536,7 @@ public static mrbind_test.mr.cs.std_ostream GetStdClog() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdClog.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -533,6 +556,7 @@ public static mrbind_test.mr.cs.std_istream GetStdCin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.iostream.H0.MR_C_GetStdCin.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_istream(__ret, __owner); } @@ -552,6 +576,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iter try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -575,6 +600,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -598,6 +624,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator a try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -621,6 +648,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +672,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_cons try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -667,6 +696,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +720,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iter try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_sub_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -713,6 +744,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_equal_MR_C_std_vector_const_MR_CSharp_A_ptr_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +768,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_set_int_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -759,6 +792,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_co try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -782,6 +816,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_flat_hash_map_int_float_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -805,6 +840,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_set_int_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -828,6 +864,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_co try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -851,6 +888,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_node_hash_map_int_float_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -874,6 +912,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -897,6 +936,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -920,6 +960,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_flat_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -943,6 +984,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -966,6 +1008,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -989,6 +1032,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_equal_MR_C_phmap_parallel_node_hash_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1012,6 +1056,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_set_int_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_equal_MR_C_phmap_btree_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1035,6 +1080,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_const_ try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1058,6 +1104,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_map_int_float_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_equal_MR_C_phmap_btree_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1081,6 +1128,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multiset_int_const_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_equal_MR_C_phmap_btree_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1104,6 +1152,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_c try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1127,6 +1176,7 @@ public static boolean opEqual(mrbind_test.phmap.phmap_btree_multimap_int_float_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_equal_MR_C_phmap_btree_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1150,6 +1200,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator a, try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1173,6 +1224,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1196,6 +1248,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, mrbin try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_sub_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1219,6 +1272,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_uint64_t_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_equal_MR_C_std_vector_uint64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1242,6 +1296,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_const_iterator a, try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1265,6 +1320,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1288,6 +1344,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int64_t_iterator a, mrbind try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_sub_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1311,6 +1368,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int64_t_iterator a, m try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_equal_MR_C_std_vector_int64_t_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1334,6 +1392,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int_const_iterator a, mrbi try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1357,6 +1416,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_const_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1380,6 +1440,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_int_iterator a, mrbind_tes try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_sub_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1403,6 +1464,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_int_iterator a, mrbin try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_equal_MR_C_std_vector_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1426,6 +1488,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_int_const_iterator a, mrbin try { long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1449,6 +1512,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_const_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1472,6 +1536,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind_test try { long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_sub_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1495,6 +1560,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_int_iterator a, mrbind try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_equal_MR_C_std_deque_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1518,6 +1584,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_int_const_iterator a, m try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1541,6 +1608,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_int_iterator a, mrbind_ try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_equal_MR_C_std_list_int_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1564,6 +1632,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_int_const_iterator a, mr try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_equal_MR_C_std_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1587,6 +1656,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_int_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_equal_MR_C_std_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1610,6 +1680,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_int_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_equal_MR_C_std_unordered_set_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1633,6 +1704,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_int_const try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_equal_MR_C_std_unordered_multiset_int_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1656,6 +1728,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1679,6 +1752,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_int_float_iterator a, mr try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_equal_MR_C_std_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1702,6 +1776,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_const_ite try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1725,6 +1800,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_int_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_equal_MR_C_std_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1748,6 +1824,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_cons try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1771,6 +1848,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_int_float_iter try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_equal_MR_C_std_unordered_map_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1794,6 +1872,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1817,6 +1896,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_int_float try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_equal_MR_C_std_unordered_multimap_int_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1840,6 +1920,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_float_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_equal_MR_C_std_multiset_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1863,6 +1944,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_float_const_iterator a, try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_equal_MR_C_std_set_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1886,6 +1968,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaul try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1909,6 +1992,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1932,6 +2016,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaul try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1955,6 +2040,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1978,6 +2064,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssign try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2001,6 +2088,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2024,6 +2112,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssign try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2047,6 +2136,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_vector_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2070,6 +2160,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssigna try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2093,6 +2184,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2116,6 +2208,7 @@ public static long opSub(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssigna try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_sub_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2139,6 +2232,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_deque_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2162,6 +2256,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2185,6 +2280,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_list_MR_StdContainers_NonAssignable_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2208,6 +2304,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2231,6 +2328,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2254,6 +2352,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2277,6 +2376,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_equal_MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2300,6 +2400,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2323,6 +2424,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2346,6 +2448,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2369,6 +2472,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2392,6 +2496,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2415,6 +2520,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2438,6 +2544,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2461,6 +2568,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_equal_MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2484,6 +2592,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_strin try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2507,6 +2616,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_ try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_const_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2530,6 +2640,7 @@ public static long opSub(mrbind_test.mr.cs.std_vector_std_expected_int_std_strin try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_sub_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2553,6 +2664,7 @@ public static boolean opEqual(mrbind_test.mr.cs.std_vector_std_expected_int_std_ try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_equal_MR_C_std_vector_std_expected_int_std_string_iterator.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java index 403ce62b..8b73fe8e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_A_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 try { mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.A at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -225,6 +233,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -248,6 +257,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -271,6 +281,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_A_42.H0.MR_C_std_array_MR_StdContainers_A_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java index 57e3e512..a0963b96 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_array_MR_StdContainers_NonAssignable_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -81,6 +83,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -105,6 +108,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -128,6 +132,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_array_MR_StdContainers_NonAssignable_42.H0.MR_C_std_array_MR_StdContainers_NonAssignable_42_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java index 364c23ca..8cfda3a9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void clear() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -218,6 +226,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -242,6 +251,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -266,6 +276,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -290,6 +301,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -314,6 +326,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -338,6 +351,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -360,6 +374,7 @@ public void pop_back() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -382,6 +397,7 @@ public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -404,6 +420,7 @@ public void pop_front() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -426,6 +443,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -448,6 +466,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignab try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -472,6 +491,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator begin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -494,6 +514,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignab try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -518,6 +539,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -540,6 +562,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -564,6 +587,7 @@ public mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator end_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -586,6 +610,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -609,6 +634,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_ try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -632,6 +658,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable_ try { long __ret = (long)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java index 839bd273..cc703535 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java index 794591d9..07fc84dd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAs try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_MR_StdContainers_NonAssignable.H0.MR_C_std_deque_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java index f158d991..af94dce1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int other) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -282,6 +293,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -328,6 +341,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -374,6 +389,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -396,6 +412,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -417,6 +434,7 @@ public void pop_back() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -438,6 +456,7 @@ public void push_front(int new_elem) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -459,6 +478,7 @@ public void pop_front() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -480,6 +500,7 @@ public void insert(long position, int new_elem) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -501,6 +522,7 @@ public void erase(long position) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -522,6 +544,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator posi try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -544,6 +567,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_deque_int_iterator posit try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -566,6 +590,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator positi try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -588,6 +613,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_deque_int_const_iterator positio try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -611,6 +637,7 @@ public mrbind_test.mr.cs.std_deque_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -633,6 +660,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -657,6 +685,7 @@ public mrbind_test.mr.cs.std_deque_int_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -679,6 +708,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_deque_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -703,6 +733,7 @@ public mrbind_test.mr.cs.std_deque_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -725,6 +756,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -749,6 +781,7 @@ public mrbind_test.mr.cs.std_deque_int_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -771,6 +804,7 @@ public boolean is_end(mrbind_test.mr.cs.std_deque_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -794,6 +828,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_int_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -817,6 +852,7 @@ public long to_index(mrbind_test.mr.cs.std_deque_int_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java index c56c6b8a..8b9ffc45 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_const_iterator oth try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java index b701eaf1..53c22c7d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_deque_int_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_deque_int_iterator other) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_deque_int.H0.MR_C_std_deque_int_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java index aedaaba7..38e6e76a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_E1_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float try { mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.E1 value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_E1_float.H0.MR_C_std_expected_MR_CSharp_E1_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java index 44828f77..46202fa7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayoutSh_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayoutSh_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayoutSh_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java index 793fc3eb..842044db 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_ExposedLayout_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ExposedLayout value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.ExposedLayout value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_ExposedLayout_float.H0.MR_C_std_expected_MR_CSharp_ExposedLayout_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java index dfc930dd..b8083ade 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_NonTrivial_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivia try { mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.NonTrivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.NonTrivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_NonTrivial_float.H0.MR_C_std_expected_MR_CSharp_NonTrivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java index b51749e5..13aa7719 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_SA_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float try { mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.SA value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.SA value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_SA_float.H0.MR_C_std_expected_MR_CSharp_SA_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java index 891bc539..30a2235d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_MR_CSharp_Trivial_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_f try { mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.Trivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -154,6 +159,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public mrbind_test.mr.csharp.Trivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_MR_CSharp_Trivial_float.H0.MR_C_std_expected_MR_CSharp_Trivial_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java index 3e682ecb..7383c069 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_float other) try { mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_float.H0.MR_C_std_expected_int_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java index 458142b1..41a814d0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_int_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_int_std_string othe try { mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -153,6 +158,7 @@ public mrbind_test.mr.cs.std_string error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -177,6 +183,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public mrbind_test.mr.cs.std_string error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_int_std_string.H0.MR_C_std_expected_int_std_string_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java index b7210b05..856d1043 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_expected_void_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_expected_void_float other) try { mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean success() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_success.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean value() try { boolean __ret = (boolean)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public java.lang.Float error() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public java.lang.foreign.MemorySegment error_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_expected_void_float.H0.MR_C_std_expected_void_float_error_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java index 23673da5..222747a8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_filesystem_path.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_filesystem_path other) try { mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public mrbind_test.mr.cs.std_string string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_filesystem_path.H0.MR_C_std_filesystem_path_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java index 64c10005..e484ab62 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_E1_from_MR_CSharp_E1.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_M try { mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) try { int __ret = (int)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_call.invokeExact(rawPointer(), java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret); } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.E1 call(mrbind_test.mr.csharp.E1 _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_E1_from_MR_CSharp_E1.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.E1 __ret = func.call(mrbind_test.mr.csharp.E1.of(_1)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_E1_from_MR_CSharp_E1.H0.MR_C_std_function_MR_CSharp_E1_from_MR_CSharp_E1_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java index 4da61b51..570af0ba 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_call.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayoutC(__ret, null); } catch (java.lang.Throwable __e) @@ -162,4 +168,65 @@ public mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLa java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.csharp.ExposedLayoutC call(mrbind_test.mr.csharp.ExposedLayoutC _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.class, "__call", java.lang.foreign.FunctionDescriptor.of(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.csharp.ExposedLayoutC __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutC(_1.reinterpret(mrbind_test.mr.csharp.ExposedLayoutC.LAYOUT.byteSize()), null)); + return mrbind_test.Ffi.ptrNonNull(__ret, "the callback result"); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC.H0.MR_C_std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java index 74e62668..d5dd21bc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_A ot try { mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.stdfunction.A call() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stdfunction.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.stdfunction.A call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.A call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.A __ret = func.call(); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_A.H0.MR_C_std_function_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java index b65c7467..df121736 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_MR_StdFunction_E_fr try { mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2 try { int __ret = (int)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_call.invokeExact(rawPointer(), _1, java.util.Objects.requireNonNull(_2, "_2").value); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.stdfunction.E.of(__ret); } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2 java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.stdfunction.E call(int _1, mrbind_test.mr.stdfunction.E _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.stdfunction.E __ret = func.call(_1, mrbind_test.mr.stdfunction.E.of(_2)); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").value; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_MR_StdFunction_E_from_int_MR_StdFunction_E.H0.MR_C_std_function_MR_StdFunction_E_from_int_MR_StdFunction_E_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java index 26f6ee1c..6d539445 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int other) try { mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public int call() try { int __ret = (int)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public int call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int.H0.MR_C_std_function_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java index 81b05ba9..a17f9f98 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_int_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_int_int ot try { mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public int call(int _1, int _2) try { int __ret = (int)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public int call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_from_int_int.H0.MR_C_std_function_int_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java index bec529cf..02a31d42 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_from_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int_from_std_string try { mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public int call(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); int __ret = (int)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -162,4 +168,65 @@ public int call(java.lang.String _1) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + int call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static int __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + int __ret = func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return 0; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_from_std_string.H0.MR_C_std_function_int_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java index 65b0ef90..39a43f38 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_ref_from_int_ref_int_rvalue_ref.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int_ref_from_int_re try { mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_ref_from_int_ref_int_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(_1, _2); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_ref_from_int_ref_int_rvalue_ref.H0.MR_C_std_function_int_ref_from_int_ref_int_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java index fb23a157..1f2b58d7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_int_rvalue_ref.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_int_rvalue_ref othe try { mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public java.lang.foreign.MemorySegment call() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -161,4 +167,65 @@ public java.lang.foreign.MemorySegment call() java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + java.lang.foreign.MemorySegment call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_int_rvalue_ref.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + java.lang.foreign.MemorySegment __ret = func.call(); + return __ret; + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_int_rvalue_ref_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_int_rvalue_ref of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_int_rvalue_ref_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_int_rvalue_ref.H0.MR_C_std_function_int_rvalue_ref_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java index bc2f5f59..35113571 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int try { mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.cs.std_string call(int _1, float _2) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, float _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, float _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int_float.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_FLOAT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, float _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int_float_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int_float of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int_float(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int_float_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_float.H0.MR_C_std_function_std_string_from_int_float_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java index ab9902d2..55c1d17d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_std_string_from_int_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_std_string_from_int try { mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public mrbind_test.mr.cs.std_string call(int _1, int _2) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -161,4 +167,66 @@ public mrbind_test.mr.cs.std_string call(int _1, int _2) java.lang.ref.Reference.reachabilityFence(this); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + mrbind_test.mr.cs.std_string call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_std_string_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.of(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static java.lang.foreign.MemorySegment __call(java.lang.foreign.MemorySegment _return_pass_by, int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + mrbind_test.mr.cs.std_string __ret = func.call(_1, _2); + _return_pass_by.reinterpret(4).set(java.lang.foreign.ValueLayout.JAVA_INT, 0, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY); + return java.util.Objects.requireNonNull(__ret, "The callback returned null.").release(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + return java.lang.foreign.MemorySegment.NULL; + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_std_string_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_std_string_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_std_string_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_std_string_from_int_int.H0.MR_C_std_function_std_string_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java index 583639ae..8c6de0c3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void other) try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,66 @@ public void call() try { mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void.H0.MR_C_std_function_void_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java index 3523af97..0071ea5b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_MR_StdFunction_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_MR_StdFun try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public void call(mrbind_test.mr.stdfunction.A _1) try { mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,4 +167,63 @@ public void call(mrbind_test.mr.stdfunction.A _1) java.lang.ref.Reference.reachabilityFence(_1); } } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.stdfunction.A _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_MR_StdFunction_A.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.stdfunction.A(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_MR_StdFunction_A_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_MR_StdFunction_A.H0.MR_C_std_function_void_from_MR_StdFunction_A_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java index 947007ae..14e198eb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_int_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_int_int o try { mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,66 @@ public void call(int _1, int _2) try { mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_call.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(int _1, int _2); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_int_int.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.JAVA_INT, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(int _1, int _2, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1, _2); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_int_int_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_int_int of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_int_int(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_int_int_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_int_int.H0.MR_C_std_function_void_from_int_int_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java index 7bb6b3e1..521708af 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_function_void_from_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_function_void_from_std_strin try { mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public void reset() try { mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,66 @@ public void call(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_call.invokeExact(rawPointer(), __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** A Java callable that an instance can hold, see `of()`. */ + @java.lang.FunctionalInterface + public interface Fn + { + void call(mrbind_test.mr.cs.std_string _1); + } + + private static final java.lang.foreign.MemorySegment CALL_STUB = mrbind_test.Ffi.upcall(java.lang.invoke.MethodHandles.lookup(), std_function_void_from_std_string.class, "__call", java.lang.foreign.FunctionDescriptor.ofVoid(java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS, java.lang.foreign.ValueLayout.ADDRESS)); + + private static void __call(java.lang.foreign.MemorySegment _1, java.lang.foreign.MemorySegment _userdata, java.lang.foreign.MemorySegment _cleanup_value) + { + Fn func = (Fn)mrbind_test.Ffi.callbackState(_userdata); + try + { + func.call(_1.address() == 0 ? null : new mrbind_test.mr.cs.std_string(_1, false, null)); + } + catch (java.lang.Throwable __e) + { + mrbind_test.Ffi.callbackFailed(__e); + } + } + + /** Constructs an instance holding a Java callable. The copies of the instance share it. An exception thrown by the callable is rethrown by the wrapper that called into C. + * + * Calls `MR_C_std_function_void_from_std_string_ConstructEx()`. */ + public static mrbind_test.mr.cs.std_function_void_from_std_string of(Fn func) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_ConstructEx.invokeExact(CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); + return new mrbind_test.mr.cs.std_function_void_from_std_string(__ret, true, null); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + } + + /** Replaces the stored callable with a Java one. + * + * Calls `MR_C_std_function_void_from_std_string_AssignEx()`. */ + public void assignFn(Fn func) + { + try + { + mrbind_test.ffi.std_function_void_from_std_string.H0.MR_C_std_function_void_from_std_string_AssignEx.invokeExact(rawPointer(), CALL_STUB, mrbind_test.Ffi.newCallbackState(java.util.Objects.requireNonNull(func, "func")), java.lang.foreign.MemorySegment.NULL, mrbind_test.Ffi.CALLBACK_STATE_STUB); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java index 61393950..bbfa5193 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainer try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -240,6 +249,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -264,6 +274,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -288,6 +299,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -312,6 +324,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -334,6 +347,7 @@ public void pop_back() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -356,6 +370,7 @@ public void push_front(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_push_front.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -378,6 +393,7 @@ public void pop_front() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -400,6 +416,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_N try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -423,6 +440,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_No try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssign try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssigna try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -492,6 +512,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -514,6 +535,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -538,6 +560,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator begin_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -560,6 +583,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -584,6 +608,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +631,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_ try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -630,6 +656,7 @@ public mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator end_mu try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -652,6 +679,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable_ try { boolean __ret = (boolean)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java index dbd2bee2..87580369 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java index fdf69831..67a27b6e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_MR_StdContainers_NonAss try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_list_MR_StdContainers_NonAssignable.H0.MR_C_std_list_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java index 43201629..55bf0b94 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int other) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -282,6 +293,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -328,6 +341,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -350,6 +364,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -371,6 +386,7 @@ public void pop_back() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +408,7 @@ public void push_front(int new_elem) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_push_front.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -413,6 +430,7 @@ public void pop_front() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_pop_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -434,6 +452,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator posit try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -456,6 +475,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_list_int_iterator positi try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -478,6 +498,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator positio try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -500,6 +521,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_list_int_const_iterator position try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -523,6 +545,7 @@ public mrbind_test.mr.cs.std_list_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -545,6 +568,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -569,6 +593,7 @@ public mrbind_test.mr.cs.std_list_int_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -591,6 +616,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_list_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -615,6 +641,7 @@ public mrbind_test.mr.cs.std_list_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -637,6 +664,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -661,6 +689,7 @@ public mrbind_test.mr.cs.std_list_int_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -683,6 +712,7 @@ public boolean is_end(mrbind_test.mr.cs.std_list_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java index 0d67303a..77efe0b5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int_const_iterator othe try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java index b9e02605..6c653c07 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_list_int_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_list_int_iterator other) try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_list_int.H0.MR_C_std_list_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java index cc42abec..316caf47 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iter try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_f try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -406,6 +422,7 @@ public mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -428,6 +445,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_f try { boolean __ret = (boolean)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java index d1a60086..c5049742 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ public void decr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java index 083af903..8dae40fb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void decr() try { mrbind_test.ffi.std_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_map_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java index 69178f18..e82606ce 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float other) try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_map_int_float_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_map_int_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.mr.cs.std_map_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.mr.cs.std_map_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_map_int_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.mr.cs.std_map_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_int_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.mr.cs.std_map_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.mr.cs.std_map_int_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java index 0a6e90d5..8aaecc4a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_const_iterator try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java index 97c19b03..4bf2faeb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_map_int_float_iterator other try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.std_map_int_float.H0.MR_C_std_map_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java index b0310ed0..45b15283 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -404,6 +420,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java index d430643b..c0e6262f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java index 83fc860e..0d8d6aa3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_MR_StdContainers_No try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_multimap_MR_StdContainers_NonAssignable_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java index a2b5971d..f6ebf710 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float other) try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_const_iterator it try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_multimap_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multimap_int_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java index 55d2bb5f..ac379b98 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_const_ite try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java index 6910e074..9d4ba42d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multimap_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multimap_int_float_iterator try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.std_multimap_int_float.H0.MR_C_std_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java index fd42ebc6..146ed89a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +275,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssig try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_itera try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -311,6 +323,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java index ff69a03d..9efcb155 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_MR_StdContainers_No try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_multiset_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java index d80185d4..af0326b2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float other) try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Float ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator find(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(float new_elem) try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_float_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_multiset_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java index 8ddef650..97bafc7a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_float_const_iterato try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_float.H0.MR_C_std_multiset_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java index ce04c86b..83604e8b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int other) try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_multiset_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_multiset_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_multiset_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_multiset_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java index 46df37bf..c799aa43 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_multiset_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_multiset_int_const_iterator try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_multiset_int.H0.MR_C_std_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java index ce408ae2..9dfd4d60 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_ExposedLayoutSh.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLa try { mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.ExposedLayoutSh other) try { mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_optional_MR_CSharp_ExposedLayoutSh_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java index 2c061c30..d73ec4ca 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_NonTrivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivia try { mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.NonTrivial other) try { mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.NonTrivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.NonTrivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_NonTrivial.H0.MR_C_std_optional_MR_CSharp_NonTrivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java index cd6a0182..c1908c81 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_SA other) try { mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.SA other) try { mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.SA value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.SA value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_SA.H0.MR_C_std_optional_MR_CSharp_SA_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java index 5c53b3d8..c759c355 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_CSharp_Trivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial o try { mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.csharp.Trivial other) try { mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.Trivial value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.csharp.Trivial value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_CSharp_Trivial.H0.MR_C_std_optional_MR_CSharp_Trivial_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java index 2c97f2c8..3a62455c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_A ot try { mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.A other) try { mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.stdoptional.A value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.stdoptional.A value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_A.H0.MR_C_std_optional_MR_StdOptional_A_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java index 4e138404..3276872d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_ConstructFrom.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_B ot try { mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.B other) try { mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_AssignFrom.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.stdoptional.B value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.stdoptional.B value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_B.H0.MR_C_std_optional_MR_StdOptional_B_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java index 973c94d4..4e677ea0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_MR_StdOptional_E.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_MR_StdOptional_E ot try { mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(mrbind_test.mr.stdoptional.E other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(other, "other").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public mrbind_test.mr.stdoptional.E value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.stdoptional.E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_MR_StdOptional_E.H0.MR_C_std_optional_MR_StdOptional_E_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java index db03cc60..e78353fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_ConstructFrom.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_int other) try { mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(int other) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_AssignFrom.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public java.lang.Integer value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public java.lang.foreign.MemorySegment value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_int.H0.MR_C_std_optional_int_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java index b0a2b676..ba3496bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_optional_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFromAnother.invokeExact((int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_ConstructFrom.invokeExact(other, other_end); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_optional_std_string other) try { mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFromAnother.invokeExact(rawPointer(), (int)(other == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other, java.lang.foreign. try { mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_AssignFrom.invokeExact(rawPointer(), other, other_end); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,6 +180,7 @@ public mrbind_test.mr.cs.std_string value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -198,6 +205,7 @@ public mrbind_test.mr.cs.std_string value_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_optional_std_string.H0.MR_C_std_optional_std_string_value_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java index 67d11008..620ab1cf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_MR_SeparateA_MR_SeparateB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_Separat try { mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.S try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(second, "second")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public mrbind_test.mr.SeparateA first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.SeparateA first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -163,6 +168,7 @@ public mrbind_test.mr.SeparateB second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -187,6 +193,7 @@ public mrbind_test.mr.SeparateB second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_pair_MR_SeparateA_MR_SeparateB_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java index f9e4db36..2781e8ec 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.s try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_Construct.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(first, "first"), second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -109,6 +112,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_MR_StdContainers_NonAssignable_float.H0.MR_C_std_pair_const_MR_StdContainers_NonAssignable_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java index ab3a39b6..1cc4aa66 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_float.H0.MR_C_std_pair_const_int_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java index d7044b29..4e419385 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_ref_const_float_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_ref_const_float_ref.H0.MR_C_std_pair_const_int_ref_const_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java index dd37846d..f44620bd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_const_int_rvalue_ref_const_float_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, first), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_const_int_rvalue_ref_const_float_rvalue_ref.H0.MR_C_std_pair_const_int_rvalue_ref_const_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java index 90dd409d..9d7c77cb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_float other) try { mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, float try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public float second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public java.lang.foreign.MemorySegment second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_float.H0.MR_C_std_pair_int_float_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java index e69c1053..24659c6a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_ref_float_ref.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -59,6 +60,7 @@ public java.lang.foreign.MemorySegment first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -82,6 +84,7 @@ public java.lang.foreign.MemorySegment second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_ref_float_ref.H0.MR_C_std_pair_int_ref_float_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java index 400c8344..337b717e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_rvalue_ref_float_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_Construct.invokeExact(first, second); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public java.lang.foreign.MemorySegment first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public java.lang.foreign.MemorySegment second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_rvalue_ref_float_rvalue_ref.H0.MR_C_std_pair_int_rvalue_ref_float_rvalue_ref_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java index 29f843a0..582f8e4b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_pair_int_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_pair_int_std_string other) try { mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -114,6 +117,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int first, java. { java.lang.foreign.MemorySegment __str_second = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(second, "second")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_Construct.invokeExact(first, __str_second, mrbind_test.Ffi.end(__str_second)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public int first() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment first_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_first_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.cs.std_string second() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.cs.std_string second_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_pair_int_std_string.H0.MR_C_std_pair_int_std_string_second_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java index 00ff59bc..8d32adf3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void insert(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_insert.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +275,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -311,6 +323,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable_c try { boolean __ret = (boolean)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java index 765c72fd..48621f01 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssi try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_set_MR_StdContainers_NonAssignable.H0.MR_C_std_set_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java index 5704c190..338b722d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_float other) try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Float ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator find(float key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(float new_elem) try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_set_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_float_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java index 838ca0bc..2ec4fc19 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_float_const_iterator oth try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_set_float.H0.MR_C_std_set_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java index da81db22..b5e1d1da 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_int other) try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_set_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_set_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_set_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java index 3a00e077..14862712 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_set_int_const_iterator other try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_set_int.H0.MR_C_std_set_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java index 4d678a2a..eed523a3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_ExposedLayoutSh.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_Exposed try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.ExposedLayoutSh get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.csharp.ExposedLayoutSh ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh constru try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.ExposedLayoutSh ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -318,6 +330,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -343,6 +356,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -366,6 +380,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -388,6 +403,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_ExposedLayoutSh.H0.MR_C_std_shared_ptr_MR_CSharp_ExposedLayoutSh_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java index facb8137..520b3fcb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SA.H0.MR_C_std_shared_ptr_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java index 44e9a73c..9757c009 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SB get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SB.H0.MR_C_std_shared_ptr_MR_CSharp_SB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java index 9ae988d6..6b3e24b4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SC get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SC(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SC ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SC(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SC ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SC.H0.MR_C_std_shared_ptr_MR_CSharp_SC_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java index d62592d1..ded2321e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SD.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SD get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SD(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SD ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SD(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SD ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SD.H0.MR_C_std_shared_ptr_MR_CSharp_SD_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java index 21ee446a..4f78dc96 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SE.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SE get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SE(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SE ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SE ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SE.H0.MR_C_std_shared_ptr_MR_CSharp_SE_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java index ea9b57e0..77c26747 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SF.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SF get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SF(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.csharp.SF ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SF(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SF ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SF.H0.MR_C_std_shared_ptr_MR_CSharp_SF_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java index be0ebd72..73d9bd0f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CSharp_SG.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG othe try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SG get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SG(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void assign(mrbind_test.mr.csharp.SG ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -238,6 +247,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SG ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +301,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CSharp_SG.H0.MR_C_std_shared_ptr_MR_CSharp_SG_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java index 6d7c1e54..b164cd32 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_CommonBaseAB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB o try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.CommonBaseAB get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.CommonBaseAB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructFromValu try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB construct(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.CommonBaseAB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB constructNonOwnin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CommonBaseAB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.CommonBaseAB ptr) try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_CommonBaseAB.H0.MR_C_std_shared_ptr_MR_CommonBaseAB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java index 145147fe..d1457c40 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA othe try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.SeparateA ptr) try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.SeparateA ptr) try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateA.H0.MR_C_std_shared_ptr_MR_SeparateA_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java index 47060fb6..8d44af77 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_SeparateB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB othe try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateB get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB constructFromValue(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructFromValue.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB construct(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.SeparateB ptr) try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB constructNonOwning(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_SeparateB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.SeparateB ptr) try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.AB.common.std_shared_ptr_MR_SeparateB.H0.MR_C_std_shared_ptr_MR_SeparateB_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java index 72405dac..5ccd29b4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructFromVa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A construct(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A constructNonOwn try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +325,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -361,6 +375,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -383,6 +398,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java index 83538f25..525b196c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.stdsharedptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -180,6 +186,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -228,6 +236,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +255,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -286,6 +297,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -363,6 +377,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -386,6 +401,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -408,6 +424,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java index 834ad452..fc76f28a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_MR_StdSharedPtr_A_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Construct.invokeExact(java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), java.util.Objects.requireNonNull(ptr, "ptr").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -238,6 +247,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -290,6 +301,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -338,6 +351,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java index 347e61db..32760b4a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_CSharp_SA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_S try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.SA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructFromV try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA construct(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA constructNonOw try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.csharp.SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -316,6 +328,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +381,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -392,6 +407,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -415,6 +431,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +454,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_CSharp_SA.H0.MR_C_std_shared_ptr_const_MR_CSharp_SA_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java index e67a8862..32d374d6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromValue.invokeExact(mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A construct try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -316,6 +328,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +351,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +381,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -392,6 +407,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -415,6 +431,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +454,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java index 879623bd..9636c178 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.stdsharedptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -180,6 +186,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -228,6 +236,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -246,6 +255,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -291,6 +302,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -341,6 +354,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -363,6 +377,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +407,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -417,6 +433,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +457,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -462,6 +480,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java index 8cadbda3..cbab05ef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_MR_StdSharedPtr_A_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_MR_StdShare try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdsharedptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void assign(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructNonOwning.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public void assignNonOwning(mrbind_test.mr.stdsharedptr.A ptr) try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignNonOwning.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -293,6 +304,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -315,6 +327,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -344,6 +357,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +383,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +407,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -414,6 +430,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_MR_StdSharedPtr_A_array_42.H0.MR_C_std_shared_ptr_const_MR_StdSharedPtr_A_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java index fcde4756..f8c7e3fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int other) try { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -197,6 +204,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int constructFromValue(int try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -215,6 +223,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -233,6 +242,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -260,6 +270,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -279,6 +290,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -305,6 +317,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -327,6 +340,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int ptr) try { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -356,6 +370,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -380,6 +395,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -402,6 +418,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int.H0.MR_C_std_shared_ptr_const_int_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java index 38a15c9b..3e09d015 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array o try { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -249,6 +258,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -267,6 +277,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -294,6 +305,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -313,6 +325,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -339,6 +352,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -361,6 +375,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array ptr) try { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -390,6 +405,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -414,6 +430,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -436,6 +453,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -458,6 +476,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int_array.H0.MR_C_std_shared_ptr_const_int_array_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java index f0708e93..6c4c5c3e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_int_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_int_array_4 try { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.Integer get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -202,6 +209,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public void assign(int ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_Assign.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +256,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructNonOwning.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public void assignNonOwning(java.lang.Integer ptr) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignNonOwning.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -292,6 +303,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_int_array_42 ptr) try { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -343,6 +356,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -367,6 +381,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -389,6 +404,7 @@ public mrbind_test.mr.cs.std_shared_ptr_const_void convertTo_MR_C_std_shared_ptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_ConvertTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -411,6 +427,7 @@ public void AssignTo_MR_C_std_shared_ptr_const_void(mrbind_test.mr.cs.std_shared try { mrbind_test.ffi.std_shared_ptr_const_int_array_42.H0.MR_C_std_shared_ptr_const_int_array_42_AssignTo_MR_C_std_shared_ptr_const_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java index b88c77cb..62f7fd10 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_const_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_const_void other) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -203,6 +210,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -248,6 +257,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromMutable(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructFromMutable.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -270,6 +280,7 @@ public void assignFromMutable(mrbind_test.mr.cs.std_shared_ptr_void ptr) try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignFromMutable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ptr, "ptr")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -299,6 +310,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -323,6 +335,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_const_void.H0.MR_C_std_shared_ptr_const_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java index 6078534b..6bd14ce2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int other) try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -202,6 +209,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromValue(int val try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructFromValue.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int construct(java.lang.foreign.M try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -238,6 +247,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -260,6 +270,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int constructNonOwning(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -279,6 +290,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -307,6 +319,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -331,6 +344,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -353,6 +367,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -375,6 +390,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int.H0.MR_C_std_shared_ptr_int_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java index 9a611b31..8785395e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array other) try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -109,6 +112,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +234,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromSize(long siz try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructFromSize.invokeExact(size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array construct(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -262,6 +272,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array constructNonOwning(java try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -331,6 +344,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -377,6 +392,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -399,6 +415,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int_array.H0.MR_C_std_shared_ptr_int_array_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java index ecf46515..a5b79bf2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_int_array_42.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_int_array_42 othe try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -197,6 +204,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 construct(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Construct.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -215,6 +223,7 @@ public void assign(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_Assign.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 constructNonOwning(j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -256,6 +266,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -284,6 +295,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -308,6 +320,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -330,6 +343,7 @@ public mrbind_test.mr.cs.std_shared_ptr_void convertTo_MR_C_std_shared_ptr_void( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_ConvertTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_void(__ret, true, null); } catch (java.lang.Throwable __e) @@ -352,6 +366,7 @@ public void AssignTo_MR_C_std_shared_ptr_void(mrbind_test.mr.cs.std_shared_ptr_v try { mrbind_test.ffi.std_shared_ptr_int_array_42.H0.MR_C_std_shared_ptr_int_array_42_AssignTo_MR_C_std_shared_ptr_void.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_target, "_target")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java index 834a4952..e1f89652 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_shared_ptr_void.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_shared_ptr_void other) try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public boolean has_value() try { boolean __ret = (boolean)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_has_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int use_count() try { int __ret = (int)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_use_count.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public void reset() try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_reset.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -203,6 +210,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructNonOwning(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructNonOwning.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public void assignNonOwning(java.lang.foreign.MemorySegment ptr) try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignNonOwning.invokeExact(rawPointer(), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -250,6 +259,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAliasing(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_ConstructAliasing.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -274,6 +284,7 @@ public void AssignAliasing(mrbind_test.mr.cs.std_shared_ptr_const_void ownership try { mrbind_test.ffi.std_shared_ptr_void.H0.MR_C_std_shared_ptr_void_AssignAliasing.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(ownership, "ownership"), ptr); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java index 2c2e1435..f5a89865 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_string other) try { mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_string.H0.MR_C_std_string_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_string.H0.MR_C_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -222,6 +230,7 @@ public java.lang.foreign.MemorySegment data_end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -245,6 +254,7 @@ public java.lang.foreign.MemorySegment data_end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string.H0.MR_C_std_string_data_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java index 2ff2ebcf..38b6d2a2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_string_view.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_ConstructFrom.invokeExact(__str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_string_view other) try { mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void assignFrom(java.lang.String other) { java.lang.foreign.MemorySegment __str_other = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(other, "other")); mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_AssignFrom.invokeExact(rawPointer(), __str_other, mrbind_test.Ffi.end(__str_other)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -155,6 +160,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -201,6 +208,7 @@ public java.lang.foreign.MemorySegment data_end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_string_view.H0.MR_C_std_string_view_data_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java index 7886ba47..33b85c6e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple other) try { mrbind_test.ffi.std_tuple.H0.MR_C_std_tuple_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java index 8dc23517..8edc1eee 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_MR_CSharp_ExposedLayout_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -163,6 +168,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout_get_const_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java index cb06928d..71b5a4f3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_ref try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref_get_const_MR_CSharp_ExposedLayout_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java index 50d00719..2727d2f7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_0, "_0"), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_MR_CSharp_ExposedLayout_rvalue_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -116,6 +119,7 @@ public mrbind_test.mr.csharp.ExposedLayout get_const_MR_CSharp_ExposedLayout_rva try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref.H0.MR_C_std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref_get_const_MR_CSharp_ExposedLayout_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java index 3d8c1ad6..f8a53944 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a.java @@ -46,6 +46,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_Construct.invokeExact(_0, _1, _2, _3, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _4), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _5), _6, _7, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _8), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _9)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public int get_const_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public float get_const_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public java.lang.foreign.MemorySegment get_int_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment get_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public int get_const_int_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -180,6 +186,7 @@ public float get_const_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -203,6 +210,7 @@ public java.lang.foreign.MemorySegment get_int_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_int_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -226,6 +234,7 @@ public java.lang.foreign.MemorySegment get_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -249,6 +258,7 @@ public int get_const_int_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_int_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -272,6 +282,7 @@ public float get_const_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_flo__22dd.H0.MR_C_std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float_rvalue_ref_const_int_rvalue_ref_const_float_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java index c3837c1e..56219490 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -72,6 +73,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_2, "_2")); java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_Construct.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _0), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_FLOAT, _1), __str__2, mrbind_test.Ffi.end(__str__2), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public int get_const_int_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public float get_const_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -137,6 +141,7 @@ public mrbind_test.mr.cs.std_string get_const_std_string_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -161,6 +166,7 @@ public mrbind_test.mr.cs.std_string get_const_std_string_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref.H0.MR_C_std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref_get_const_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java index 5586fbb3..a03badfa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_const_int_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lan { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public int get_const_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_const_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -157,6 +162,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_const_int_std_string.H0.MR_C_std_tuple_const_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java index 1a50ebf8..589991cc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_float_double_int_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_float_double_int_int o try { mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(float _0, double try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_Construct.invokeExact(_0, _1, _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public double get_double() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_DOUBLE, 0); } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public java.lang.foreign.MemorySegment get_double_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_double_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -223,6 +231,7 @@ public int get_int_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -246,6 +255,7 @@ public java.lang.foreign.MemorySegment get_int_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -269,6 +279,7 @@ public int get_int_3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -292,6 +303,7 @@ public java.lang.foreign.MemorySegment get_int_3_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_float_double_int_int.H0.MR_C_std_tuple_float_double_int_int_get_int_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java index 3395bbc4..eaaa1c75 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int other) try { mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_Construct.invokeExact(_0); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public int get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int.H0.MR_C_std_tuple_int_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java index f400d3f2..afed8519 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_float other) try { mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_Construct.invokeExact(_0, _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public int get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_float.H0.MR_C_std_tuple_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java index e252ffff..eb36d206 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.foreig { java.lang.foreign.MemorySegment __str__3 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_3, "_3")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_Construct.invokeExact(_0, _1, mrbind_test.Ffi.ptrNonNull(_2, "_2"), __str__3, mrbind_test.Ffi.end(__str__3)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ public java.lang.foreign.MemorySegment get_int_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_int_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public java.lang.foreign.MemorySegment get_float_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_float_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public mrbind_test.mr.cs.std_string get_std_string_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -136,6 +140,7 @@ public mrbind_test.mr.cs.std_string get_std_string_rvalue_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref.H0.MR_C_std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref_get_std_string_rvalue_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java index 3e3ec09a..179979e1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_tuple_int_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_tuple_int_std_string other) try { mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -114,6 +117,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _0, java.lan { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_Construct.invokeExact(_0, __str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public int get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -203,6 +210,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_tuple_int_std_string.H0.MR_C_std_tuple_int_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java index 623ae858..145edfc4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(mrbind_test.mr.stduniqueptr.A other) try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public mrbind_test.mr.stduniqueptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -176,6 +182,7 @@ public mrbind_test.mr.stduniqueptr.A release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java index 8ab46d2f..86b761ad 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_MR_StdUniquePtr_A_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_ConstructFrom.invokeExact(java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniquePtr_A try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void assignFrom(mrbind_test.mr.stduniqueptr.A other) try { mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_AssignFrom.invokeExact(rawPointer(), java.util.Objects.requireNonNull(other, "other").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public mrbind_test.mr.stduniqueptr.A get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -177,6 +183,7 @@ public mrbind_test.mr.stduniqueptr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } @@ -201,6 +208,7 @@ public mrbind_test.mr.stduniqueptr.A release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_MR_StdUniquePtr_A_array.H0.MR_C_std_unique_ptr_MR_StdUniquePtr_A_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java index 3bb15bb6..2a04d900 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int other) try { mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other) try { mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public java.lang.foreign.MemorySegment release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int.H0.MR_C_std_unique_ptr_int_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java index 75667343..66f64e9c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unique_ptr_int_array.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_ConstructFrom.invokeExact(other); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unique_ptr_int_array other) try { mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void assignFrom(java.lang.foreign.MemorySegment other) try { mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_AssignFrom.invokeExact(rawPointer(), other); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public java.lang.foreign.MemorySegment get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public java.lang.foreign.MemorySegment release_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unique_ptr_int_array.H0.MR_C_std_unique_ptr_int_array_release.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java index 7134b6b1..f82d6439 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(mrbind_test.mr.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -268,6 +278,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -314,6 +326,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -360,6 +374,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -406,6 +422,7 @@ public mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -428,6 +445,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java index 908d1623..7f7a0983 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java index 950a30ca..f2238df6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_MR_StdContaine try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_map_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java index d10a26e4..1ed24b2d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float othe try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator find(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_map_int_float_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.mr.cs.std_unordered_map_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_map_int_float_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java index b242e1c3..719037f6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_cons try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java index dd174895..8dca84d8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_map_int_float_iter try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_map_int_float.H0.MR_C_std_unordered_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java index 49479696..1e8f792e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -244,6 +253,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -290,6 +301,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -336,6 +349,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -382,6 +397,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -404,6 +420,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java index 39ac422a..71f0330b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -183,6 +189,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -205,6 +212,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java index 591cfc58..f7672c58 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_MR_StdCon try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float der try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_MR_StdContainers_NonAssignable_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -156,6 +161,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_MR_StdContainers_NonAssignable_float.H0.MR_C_std_unordered_multimap_MR_StdContainers_NonAssignable_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java index e9258558..9a58082b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator find(in try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator find_mut(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_const try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multimap_int_float_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_const_i try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multimap_int_float_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java index f525d03d..fb125270 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java index c2fbfc41..a0afe53a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multimap_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multimap_int_float try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multimap_int_float.H0.MR_C_std_unordered_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java index b32f158c..da707bac 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(mrbind_test.mr.stdcontainers.NonAssignable key) try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_count.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -242,6 +251,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainer try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -288,6 +299,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_ try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java index b0324811..484b26bc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_MR_StdCon try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multiset_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_multiset_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java index 606b835a..d0f5d4bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int other try { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_multiset_int_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_multiset_int_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java index a4129c4c..783af965 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_multiset_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_multiset_int_const try { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_multiset_int.H0.MR_C_std_unordered_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java index c7b0a441..7f807dbe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public boolean contains(mrbind_test.mr.stdcontainers.NonAssignable key) try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_contains.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +203,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_find.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(key, "key")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -242,6 +251,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_Non try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -288,6 +299,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAs try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java index 3e69169c..80193b0e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_MR_StdContaine try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_set_MR_StdContainers_NonAssignable.H0.MR_C_std_unordered_set_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java index c80c0013..e68840b7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int other) try { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.mr.cs.std_unordered_set_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_unordered_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_unordered_set_int_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.mr.cs.std_unordered_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.mr.cs.std_unordered_set_int_const_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java index f3050e16..cbcb2b47 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_unordered_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_unordered_set_int_const_iter try { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_unordered_set_int.H0.MR_C_std_unordered_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java index 1956e708..de28c6d9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float other) try { mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public void AssignAs_int(int value) try { mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -196,6 +203,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -218,6 +226,7 @@ public java.lang.Integer get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float.H0.MR_C_std_variant_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java index a5d60173..4aa4984a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_float othe try { mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_1( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_1.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -170,6 +176,7 @@ public static mrbind_test.mr.cs.std_variant_int_float_float constructAs_float_2( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -188,6 +195,7 @@ public void AssignAs_int(int value) try { mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -209,6 +217,7 @@ public void AssignAs_float_1(float value) try { mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_1.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -230,6 +239,7 @@ public void AssignAs_float_2(float value) try { mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -252,6 +262,7 @@ public java.lang.Integer get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -275,6 +286,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -298,6 +310,7 @@ public java.lang.Float get_float_1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -321,6 +334,7 @@ public java.lang.foreign.MemorySegment get_float_1_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_1_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -344,6 +358,7 @@ public java.lang.Float get_float_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -367,6 +382,7 @@ public java.lang.foreign.MemorySegment get_float_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_float.H0.MR_C_std_variant_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java index 2f2ced6a..a24d889e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_int_float_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_int_float_std_string try { mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_std_string(jav { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_ConstructAs_std_string.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void AssignAs_int(int value) try { mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -221,6 +229,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -244,6 +253,7 @@ public void AssignAs_std_string(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_AssignAs_std_string.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +276,7 @@ public java.lang.Integer get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -312,6 +324,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -335,6 +348,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -358,6 +372,7 @@ public mrbind_test.mr.cs.std_string get_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -382,6 +397,7 @@ public mrbind_test.mr.cs.std_string get_std_string_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_int_float_std_string.H0.MR_C_std_variant_int_float_std_string_get_std_string_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java index c99ba849..8b129c0c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float.java @@ -33,6 +33,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float defaultConst try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -80,6 +82,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_fl try { mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -102,6 +105,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -125,6 +129,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float constructAs_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -148,6 +153,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -171,6 +177,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_float(float va try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_ConstructAs_float.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -190,6 +197,7 @@ public void AssignAs_std_monostate() try { mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -211,6 +219,7 @@ public void AssignAs_int(int value) try { mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -232,6 +241,7 @@ public void AssignAs_float(float value) try { mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_AssignAs_float.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -254,6 +264,7 @@ public boolean get_std_monostate() try { boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -277,6 +288,7 @@ public java.lang.Integer get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -300,6 +312,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -323,6 +336,7 @@ public java.lang.Float get_float() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment get_float_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float.H0.MR_C_std_variant_std_monostate_int_float_get_float_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java index 2a8ae5f6..53b0413c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_variant_std_monostate_int_float_float.java @@ -33,6 +33,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float defaul try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -80,6 +82,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_variant_std_monostate_int_fl try { mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -102,6 +105,7 @@ public long index() try { long __ret = (long)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_index.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -125,6 +129,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_std_monostate.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -148,6 +153,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructAs_int(int value) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_int.invokeExact(value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -166,6 +172,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_2.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -184,6 +191,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float constr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_ConstructAs_float_3.invokeExact(value); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -203,6 +211,7 @@ public void AssignAs_std_monostate() try { mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -224,6 +233,7 @@ public void AssignAs_int(int value) try { mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_int.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -245,6 +255,7 @@ public void AssignAs_float_2(float value) try { mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_2.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +277,7 @@ public void AssignAs_float_3(float value) try { mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_AssignAs_float_3.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -288,6 +300,7 @@ public boolean get_std_monostate() try { boolean __ret = (boolean)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_std_monostate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -311,6 +324,7 @@ public java.lang.Integer get_int() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -334,6 +348,7 @@ public java.lang.foreign.MemorySegment get_int_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_int_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -357,6 +372,7 @@ public java.lang.Float get_float_2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -380,6 +396,7 @@ public java.lang.foreign.MemorySegment get_float_2_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_2_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -403,6 +420,7 @@ public java.lang.Float get_float_3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Float)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -426,6 +444,7 @@ public java.lang.foreign.MemorySegment get_float_3_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_variant_std_monostate_int_float_float.H0.MR_C_std_variant_std_monostate_int_float_float_get_float_3_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java index 194d3e16..38686116 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A other) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.A value) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public mrbind_test.mr.A at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -304,6 +316,7 @@ public mrbind_test.mr.A at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -328,6 +341,7 @@ public mrbind_test.mr.A front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -352,6 +366,7 @@ public mrbind_test.mr.A front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -376,6 +391,7 @@ public mrbind_test.mr.A back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -400,6 +416,7 @@ public mrbind_test.mr.A back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.A(__ret, false, __owner); } @@ -424,6 +441,7 @@ public void push_back(mrbind_test.mr.A new_elem) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -468,6 +487,7 @@ public void insert(long position, mrbind_test.mr.A new_elem) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -490,6 +510,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -512,6 +533,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator po try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -535,6 +557,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_A_iterator pos try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -558,6 +581,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator posi try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -581,6 +605,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_A_const_iterator posit try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +629,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -626,6 +652,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -650,6 +677,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -672,6 +700,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -696,6 +725,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -718,6 +748,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -742,6 +773,7 @@ public mrbind_test.mr.cs.std_vector_MR_A_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_A_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -764,6 +796,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -787,6 +820,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_A_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -810,6 +844,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_A_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java index 35b47fb0..409b31fe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_const_iterator o try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.A deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java index 5b8e6b39..65ea4c1d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_A_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_A_iterator other) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.A deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.A(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_A.H0.MR_C_std_vector_MR_A_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java index 9ffda99c..24645982 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr other try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A val try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +339,7 @@ public java.lang.foreign.MemorySegment front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -349,6 +363,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -372,6 +387,7 @@ public java.lang.foreign.MemorySegment back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -395,6 +411,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -418,6 +435,7 @@ public void push_back(mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +458,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -462,6 +481,7 @@ public void insert(long position, mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -484,6 +504,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -506,6 +527,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_ try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +551,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_i try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +575,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_it try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -575,6 +599,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_ite try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -598,6 +623,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -620,6 +646,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +671,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -666,6 +694,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator it try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +719,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -712,6 +742,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +767,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -758,6 +790,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -781,6 +814,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const_iterator try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -804,6 +838,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java index f1c34b65..36ffd607 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_const try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java index 8178c424..329a8858 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_A_ptr_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr_itera try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_A_ptr.H0.MR_C_std_vector_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java index 0127f6eb..551e1968 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_ConstructFromRange.invokeExact(mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +138,7 @@ public void assignFromRange(mrbind_test.mr.csharp.ExposedLayout ptr, long size) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_AssignFromRange.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(ptr), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -221,6 +229,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.Expos try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -243,6 +252,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -264,6 +274,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -307,6 +319,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -329,6 +342,7 @@ public mrbind_test.mr.csharp.ExposedLayout at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -353,6 +367,7 @@ public mrbind_test.mr.csharp.ExposedLayout at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -377,6 +392,7 @@ public mrbind_test.mr.csharp.ExposedLayout front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -401,6 +417,7 @@ public mrbind_test.mr.csharp.ExposedLayout front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -425,6 +442,7 @@ public mrbind_test.mr.csharp.ExposedLayout back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -449,6 +467,7 @@ public mrbind_test.mr.csharp.ExposedLayout back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -473,6 +492,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -496,6 +516,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -519,6 +540,7 @@ public void push_back(mrbind_test.mr.csharp.ExposedLayout new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -541,6 +563,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -563,6 +586,7 @@ public void insert(long position, mrbind_test.mr.csharp.ExposedLayout new_elem) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -585,6 +609,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -607,6 +632,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_Expose try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -630,6 +656,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_Exposed try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -653,6 +680,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_ try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -676,6 +704,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_c try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -699,6 +728,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator begin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_con try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -745,6 +776,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -767,6 +799,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_ite try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -791,6 +824,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -813,6 +847,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -837,6 +872,7 @@ public mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -859,6 +895,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -882,6 +919,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_const_ try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -905,6 +943,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout_iterat try { long __ret = (long)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java index 44433f7c..2269bec7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.csharp.ExposedLayout deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java index 0a46b200..6ee3b0fe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_CSharp_ExposedLayout_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayo try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.ExposedLayout deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_CSharp_ExposedLayout.H0.MR_C_std_vector_MR_CSharp_ExposedLayout_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java index 0b06ed08..241eb9ed 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA other) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateA va try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.SeparateA at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.SeparateA at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.SeparateA front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.SeparateA front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.SeparateA back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.SeparateA back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.SeparateA new_elem) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.SeparateA new_elem) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_ite try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_iter try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_itera try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterat try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_iterator it try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator iter) try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java index a7bffd9f..d9cc8cc7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_const_it try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.SeparateA deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java index a752542f..12dc1481 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateA_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateA_iterator try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateA deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateA(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateA.H0.MR_C_std_vector_MR_SeparateA_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java index ce78acf0..ffa49af7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB other) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.SeparateB va try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.SeparateB at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.SeparateB at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.SeparateB front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.SeparateB front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.SeparateB back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.SeparateB back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.SeparateB new_elem) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.SeparateB new_elem) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_ite try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_iter try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_itera try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterat try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_iterator it try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator iter) try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java index 33ff7015..435e96b6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_const_it try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java index 58b59520..73714980 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_SeparateB_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_SeparateB_iterator try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.SeparateB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_MR_SeparateB.H0.MR_C_std_vector_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java index 18ec7487..3c5de01f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +200,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -215,6 +223,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -236,6 +245,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -282,6 +293,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -306,6 +318,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -330,6 +343,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -354,6 +368,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -378,6 +393,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -402,6 +418,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonAssignable new_elem) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -424,6 +441,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterato try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -468,6 +487,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -492,6 +512,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator begi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -514,6 +535,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssigna try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -538,6 +560,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterato try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -560,6 +583,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -584,6 +608,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator end_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +631,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignabl try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -652,6 +679,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java index 67b60de7..c97bba96 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java index b29f422c..4f48ab3f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonAssignable_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonA try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonAssignable deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonAssignable(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonAssignable.H0.MR_C_std_vector_MR_StdContainers_NonAssignable_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java index df40cfb2..a3d8d80c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.stdcontainer try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.stdcontainers.NonDefaultConstructible new_e try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.stdcontainers.NonDefaultConstru try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_ try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefa try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefau try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefault try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefault try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCo try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCon try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultCon try { long __ret = (long)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java index 8b6d8009..f3f4e76e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java index ac41c031..d483470d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_MR_StdContainers_NonDefaultConstructible_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_MR_StdContainers_NonD try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_MR_StdContainers_NonDefaultConstructible.H0.MR_C_std_vector_MR_StdContainers_NonDefaultConstructible_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java index 80c537a1..60eadc8a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.csharp.A val try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public java.lang.foreign.MemorySegment at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -303,6 +315,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +339,7 @@ public java.lang.foreign.MemorySegment front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -349,6 +363,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -372,6 +387,7 @@ public java.lang.foreign.MemorySegment back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -395,6 +411,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -418,6 +435,7 @@ public void push_back(mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -440,6 +458,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -462,6 +481,7 @@ public void insert(long position, mrbind_test.mr.csharp.A new_elem) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -484,6 +504,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -506,6 +527,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_ try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +551,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +575,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_co try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.ptr(new_elem)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -575,6 +599,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_con try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -598,6 +623,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -620,6 +646,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -644,6 +671,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -666,6 +694,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_itera try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -690,6 +719,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -712,6 +742,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_i try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -736,6 +767,7 @@ public mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -758,6 +790,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterato try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -781,6 +814,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_const_it try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -804,6 +838,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr_iterator try { long __ret = (long)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java index b5728307..9e3ec838 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java index 5aa66f10..3da632ea 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_const_MR_CSharp_A_ptr_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_const_MR_CSharp_A_ptr.H0.MR_C_std_vector_const_MR_CSharp_A_ptr_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java index ebc3b5aa..b625a6fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int other) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, int value) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public int at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Integer front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Integer back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -506,6 +527,7 @@ public void push_back(int new_elem) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -527,6 +549,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -548,6 +571,7 @@ public void insert(long position, int new_elem) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -569,6 +593,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -590,6 +615,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator pos try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -612,6 +638,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int_iterator posi try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -634,6 +661,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator posit try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -656,6 +684,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_int_const_iterator positi try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -679,6 +708,7 @@ public mrbind_test.mr.cs.std_vector_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -701,6 +731,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -725,6 +756,7 @@ public mrbind_test.mr.cs.std_vector_int_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -747,6 +779,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -771,6 +804,7 @@ public mrbind_test.mr.cs.std_vector_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -793,6 +827,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -817,6 +852,7 @@ public mrbind_test.mr.cs.std_vector_int_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -839,6 +875,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -862,6 +899,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -885,6 +923,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java index f919110b..2c760966 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t other) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Long ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, long value) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public long at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Long front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Long back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void push_back(long new_elem) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -528,6 +550,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +573,7 @@ public void insert(long position, long new_elem) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -615,6 +641,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_int64_t_iterator try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -638,6 +665,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator p try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -660,6 +688,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_int64_t_const_iterator po try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -683,6 +712,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -705,6 +735,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -729,6 +760,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -751,6 +783,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -775,6 +808,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -797,6 +831,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -821,6 +856,7 @@ public mrbind_test.mr.cs.std_vector_int64_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -843,6 +879,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -866,6 +903,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int64_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -889,6 +927,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_int64_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java index ac401e7e..d5a18581 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_const_iterato try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public long deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java index c44aa941..2bbaa8e6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int64_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int64_t_iterator othe try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int64_t.H0.MR_C_std_vector_int64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java index 0224f070..b6599087 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_const_iterator ot try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java index 42e79cad..ee3bf5ef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_int_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_int_iterator other) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_int.H0.MR_C_std_vector_int_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java index 19df90e6..c1dbdebe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_ try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_expec try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public void clear() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -280,6 +291,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -304,6 +316,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -328,6 +341,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -352,6 +366,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -376,6 +391,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -400,6 +416,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -424,6 +441,7 @@ public void push_back(mrbind_test.mr.cs.std_expected_int_std_string new_elem) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -446,6 +464,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -468,6 +487,7 @@ public void insert(long position, mrbind_test.mr.cs.std_expected_int_std_string try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -490,6 +510,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -512,6 +533,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -535,6 +557,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_expected_int_ try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -558,6 +581,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_str try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -581,6 +605,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_expected_int_std_stri try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +629,7 @@ public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -626,6 +652,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -650,6 +677,7 @@ public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator begin_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -672,6 +700,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_expected_int_std_string try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -696,6 +725,7 @@ public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -718,6 +748,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_c try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -742,6 +773,7 @@ public mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator end_mut try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -764,6 +796,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_i try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -787,6 +820,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_co try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -810,6 +844,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_expected_int_std_string_it try { long __ret = (long)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java index 462d8cfe..99c25263 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_ try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java index c3fd02da..1839d460 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_expected_int_std_string_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_expected_int_std_ try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_expected_int_std_string deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_std_expected_int_std_string.H0.MR_C_std_vector_std_expected_int_std_string_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java index db65e617..8aadadf7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void resize_with_default_value(long new_size, mrbind_test.mr.cs.std_pair_ try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_resize_with_default_value.invokeExact(rawPointer(), new_size, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void clear() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -216,6 +224,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -283,6 +294,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -307,6 +319,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -355,6 +369,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -379,6 +394,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -403,6 +419,7 @@ public void push_back(mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB new_e try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_push_back.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -425,6 +442,7 @@ public void pop_back() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -447,6 +465,7 @@ public void insert(long position, mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_Sep try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert.invokeExact(rawPointer(), position, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -469,6 +488,7 @@ public void erase(long position) try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -491,6 +511,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_Sepa try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -514,6 +535,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_Separ try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -537,6 +559,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(new_elem, "new_elem")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -560,6 +583,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_ try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -583,6 +607,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -605,6 +630,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Se try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -629,6 +655,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -651,6 +678,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Se try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -675,6 +703,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_ite try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -697,6 +726,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Sepa try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -721,6 +751,7 @@ public mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -743,6 +774,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Sepa try { boolean __ret = (boolean)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -766,6 +798,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Separ try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -789,6 +822,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA_MR_Separ try { long __ret = (long)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java index d2a21ee7..21b6cda6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -158,6 +163,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -200,6 +207,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java index df3a64fe..4169e5bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_std_pair_MR_SeparateA try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_MR_SeparateA_MR_SeparateB(__ret, false, __owner); } @@ -131,6 +135,7 @@ public void incr() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void decr() try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.AB.common.std_vector_std_pair_MR_SeparateA_MR_SeparateB.H0.MR_C_std_vector_std_pair_MR_SeparateA_MR_SeparateB_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java index 2307be69..a10fb415 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t other) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Long ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_LONG, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void resize(long new_size) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize.invokeExact(rawPointer(), new_size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void resize_with_default_value(long new_size, long value) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_resize_with_default_value.invokeExact(rawPointer(), new_size, value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void clear() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +268,7 @@ public long capacity() try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_capacity.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -280,6 +291,7 @@ public void reserve(long new_capacity) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_reserve.invokeExact(rawPointer(), new_capacity); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -301,6 +313,7 @@ public void shrink_to_fit() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_shrink_to_fit.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -323,6 +336,7 @@ public long at(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -346,6 +360,7 @@ public java.lang.foreign.MemorySegment at_mut(long i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_at_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -369,6 +384,7 @@ public java.lang.Long front() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -392,6 +408,7 @@ public java.lang.foreign.MemorySegment front_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_front_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -415,6 +432,7 @@ public java.lang.Long back() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Long)__ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -438,6 +456,7 @@ public java.lang.foreign.MemorySegment back_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_back_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -461,6 +480,7 @@ public java.lang.foreign.MemorySegment data() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -484,6 +504,7 @@ public java.lang.foreign.MemorySegment data_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_data_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -507,6 +528,7 @@ public void push_back(long new_elem) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_push_back.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -528,6 +550,7 @@ public void pop_back() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_pop_back.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +573,7 @@ public void insert(long position, long new_elem) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert.invokeExact(rawPointer(), position, new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -571,6 +595,7 @@ public void erase(long position) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase.invokeExact(rawPointer(), position); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -593,6 +618,7 @@ public void insert_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterato try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -615,6 +641,7 @@ public void erase_at_mutable_iter(mrbind_test.mr.cs.std_vector_uint64_t_iterator try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_mutable_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -638,6 +665,7 @@ public void insert_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_insert_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position"), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -660,6 +688,7 @@ public void erase_at_iter(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator p try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_erase_at_iter.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(position, "position")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -683,6 +712,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -705,6 +735,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -729,6 +760,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -751,6 +783,7 @@ public boolean is_begin(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -775,6 +808,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -797,6 +831,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -821,6 +856,7 @@ public mrbind_test.mr.cs.std_vector_uint64_t_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -843,6 +879,7 @@ public boolean is_end(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -866,6 +903,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_const_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -889,6 +927,7 @@ public long to_index(mrbind_test.mr.cs.std_vector_uint64_t_iterator iter) try { long __ret = (long)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_to_index_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java index 661defbf..f3d4ca88 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_const_iterat try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public long deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void incr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +184,7 @@ public void decr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +206,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_const_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java index 73cd8bc8..fe879d25 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/cs/std_vector_uint64_t_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.mr.cs.std_vector_uint64_t_iterator oth try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public java.lang.foreign.MemorySegment deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void add_assign(long delta) try { mrbind_test.ffi.std_vector_uint64_t.H0.MR_C_std_vector_uint64_t_iterator_add_assign.invokeExact(rawPointer(), delta); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java index 727cbe82..6114e161 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/A.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -93,6 +95,7 @@ public mrbind_test.mr.csharp.A assignFromAnother(mrbind_test.mr.csharp.A _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -117,6 +120,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -138,6 +142,7 @@ public void bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -159,6 +164,7 @@ public static void static_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public static void static_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +200,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,6 +222,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -235,6 +244,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_A_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java index 6cc71c0a..c2eafab4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/AmbiguousTemplates.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.AmbiguousTemplates assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.AmbiguousTemplates(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void template_a(int _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void template_a(float _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_a_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public int template_b_int() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public float template_b_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_b_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void template_c_int() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public void template_c_float() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_template_c_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void instantiate() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_AmbiguousTemplates_instantiate.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java index 3c878082..21aaece3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ArrayMembers.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public int ia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public static long iaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -171,6 +177,7 @@ public java.lang.foreign.MemorySegment iaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_iaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -193,6 +200,7 @@ public static long iaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_iaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -212,6 +220,7 @@ public int ci() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ci.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -235,6 +244,7 @@ public int cia() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cia.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -257,6 +267,7 @@ public static long ciaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_cia.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -276,6 +287,7 @@ public java.lang.foreign.MemorySegment ciaa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_ciaa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -298,6 +310,7 @@ public static long ciaaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_ciaa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -317,6 +330,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -342,6 +356,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -364,6 +379,7 @@ public mrbind_test.mr.cs.std_string sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_sa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -387,6 +403,7 @@ public static long saSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -407,6 +424,7 @@ public mrbind_test.mr.cs.std_string cs() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_cs.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -431,6 +449,7 @@ public mrbind_test.mr.cs.std_string csa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_Get_csa.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -454,6 +473,7 @@ public static long csaSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_ArrayMembers_GetSize_csa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java index f5bbc254..25e59795 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/B.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int a, int b) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_Construct.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.B assignFromAnother(mrbind_test.mr.csharp.B _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.B(__ret, false, __owner); } @@ -135,6 +139,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public void bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -177,6 +183,7 @@ public static void static_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public static void static_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -211,6 +219,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -232,6 +241,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -253,6 +263,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -264,4 +275,64 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_B_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.B dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_B_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java index f7920557..73cf5bd8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/C.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.C assignFromAnother(mrbind_test.mr.csharp.C _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.C(__ret, false, __owner); } @@ -112,6 +115,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,7 +136,8 @@ public void bar(int _1, int _2) { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,7 +158,8 @@ public static void static_foo() { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_foo.invokeExact(); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -170,7 +176,8 @@ public static void static_bar(int _1, int _2) { try { - mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_C_static_bar.invokeExact(_1, _2); + mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -188,6 +195,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -209,6 +217,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -230,6 +239,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -241,4 +251,44 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_C_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `C`. The result refers to `object`. + * + * Calls `MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.C dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_C_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.C(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java index 47b3b3b3..005fdf0a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/CallOp.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.CallOp assignFromAnother(mrbind_test.mr.csharp.Call try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.CallOp(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void call_0() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public int call_3(int _1, int _2, int _3) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_CallOp_call_3.invokeExact(rawPointer(), _1, _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java index 5d0ed26a..d64099a9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersBool.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, d)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -124,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -143,6 +148,7 @@ public static void setSb(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +185,7 @@ public static boolean sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) @@ -197,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -265,6 +276,7 @@ public void setB(java.lang.Boolean value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -287,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +323,7 @@ public boolean d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersBool_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java index 3908e24d..12a9c63c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersClass.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -71,6 +72,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -96,6 +98,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public static void setSa(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -136,6 +140,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public static void setSb(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public static mrbind_test.mr.csharp.A sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -195,6 +202,7 @@ public static mrbind_test.mr.csharp.A sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -215,6 +223,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -238,6 +247,7 @@ public void setA(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -261,6 +271,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -284,6 +295,7 @@ public void setB(mrbind_test.mr.csharp.A value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -307,6 +319,7 @@ public mrbind_test.mr.csharp.A c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } @@ -331,6 +344,7 @@ public mrbind_test.mr.csharp.A d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersClass_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java index ab22a094..c497434f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersExposed.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_ConstructFrom.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptrNonNull(c, "c"), mrbind_test.Ffi.ptrNonNull(d, "d")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -95,6 +97,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public static void setSa(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sa.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public static void setSb(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_sb.invokeExact(mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +181,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -194,6 +201,7 @@ public static mrbind_test.mr.csharp.ExposedLayout sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -214,6 +222,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -237,6 +246,7 @@ public void setA(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -260,6 +270,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -283,6 +294,7 @@ public void setB(mrbind_test.mr.csharp.ExposedLayout value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -306,6 +318,7 @@ public mrbind_test.mr.csharp.ExposedLayout c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -330,6 +343,7 @@ public mrbind_test.mr.csharp.ExposedLayout d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersExposed_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java index 371acc5f..191b5b42 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ClassMemberPointersUshort.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_ConstructFrom.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, d)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public static java.lang.foreign.MemorySegment sa() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sa.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public static void setSa(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sa.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -124,6 +128,7 @@ public static java.lang.foreign.MemorySegment sb() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sb.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -143,6 +148,7 @@ public static void setSb(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_sb.invokeExact((java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +166,7 @@ public static java.lang.foreign.MemorySegment sc() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sc.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,6 +185,7 @@ public static short sd() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_sd.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -197,6 +205,7 @@ public java.lang.foreign.MemorySegment a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +229,7 @@ public void setA(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_a.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -242,6 +252,7 @@ public java.lang.foreign.MemorySegment b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -265,6 +276,7 @@ public void setB(java.lang.Short value) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Set_b.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(value == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -287,6 +299,7 @@ public java.lang.foreign.MemorySegment c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_c.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +323,7 @@ public short d() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ClassMemberPointersUshort_Get_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java index 468d8438..0d2b8b91 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConstNonconstConflicts.java @@ -36,6 +36,7 @@ public void foo(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -57,6 +58,7 @@ public void foo(float _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -78,6 +80,7 @@ public void foo_mut_char(byte _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_mut_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -99,6 +102,7 @@ public void foo_char(byte _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConstNonconstConflicts_foo_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -120,6 +124,7 @@ public int opPos_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -142,6 +147,7 @@ public int opPos_const_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_pos_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -165,6 +171,7 @@ public void opCompl_ref() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +193,7 @@ public void opCompl_const_ref() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_compl_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -207,6 +215,7 @@ public int opDiv_ref_int(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -229,6 +238,7 @@ public int opDiv_const_ref_int(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_div_const_MR_CSharp_ConstNonconstConflicts_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java index acd2a1fd..e1e67bea 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtor.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_int(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_int(int _1, in try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_int.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -137,6 +141,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_short(short _1 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_short.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -160,6 +165,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_float(float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_1_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -183,6 +189,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2_float(float _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_Construct_2_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public mrbind_test.mr.csharp.ConvCtor assignFromAnother(mrbind_test.mr.csharp.Co try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtor_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtor(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java index b65cebe5..d557d73e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorCopyButNoMove.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ConvCtorCopyButNoMove assignFromAnother(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorCopyButNoMove_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorCopyButNoMove(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java index c7ccbd7e..634606c7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorExposed.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorExposed_Construct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java index 692b6556..a773de34 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivial.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.ConvCtorNonTrivial assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java index ef295dcd..6a486e80 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorNonTrivialRestricted.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted assignFromAnother(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorNonTrivialRestricted_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorNonTrivialRestricted(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java index d3800440..310545d4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorTrivial.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.ConvCtorTrivial assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java index 08c38364..b7177555 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvCtorWithDefArg.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(java.lang.Intege try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_Construct.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.ConvCtorWithDefArg assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvCtorWithDefArg_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvCtorWithDefArg(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java index 791c9ebb..70ab16ca 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOp.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public float convertTo_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_ConvertTo_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.ConvOp assignFromAnother(mrbind_test.mr.csharp.Conv try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOp_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvOp(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java index 42916991..af052049 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ConvOpToRef.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public java.lang.foreign.MemorySegment convertTo_float_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_float_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment convertTo_unsigned_short_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_ConvertTo_unsigned_short_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.csharp.ConvOpToRef assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ConvOpToRef_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ConvOpToRef(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java index ac0228af..6be932e9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/D.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.D assignFromAnother(mrbind_test.mr.csharp.D _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.D(__ret, false, __owner); } @@ -113,6 +116,7 @@ public void d1() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -134,6 +138,7 @@ public void d2() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_D_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java index e39d8ef6..bb4e4e83 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/E.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.csharp.E assignFromAnother(mrbind_test.mr.csharp.E _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.E(__ret, false, __owner); } @@ -114,6 +117,7 @@ public void e1() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public void e2() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_E_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java index 008d3bfa..ad1d667e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityA assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityA(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(int _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public boolean opNotEqual(int _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityA_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public boolean opEqual(mrbind_test.mr.csharp.EqualityA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java index 1fc6bb3f..430f175b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityB assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opEqual(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int opNotEqual(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityB_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public int opEqual(mrbind_test.mr.csharp.EqualityB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java index 3e001487..d0c4f3c0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityC assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityC(__ret, false, __owner); } @@ -110,6 +113,7 @@ public void opEqual(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +135,7 @@ public void opNotEqual(int _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_not_equal_MR_CSharp_EqualityC_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +157,7 @@ public void opEqual(mrbind_test.mr.csharp.EqualityC _1) try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java index ba308694..678dc30b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityD assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityD(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(java.lang.Integer _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityD_const_int_ptr.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java index 71c9a91a..e7fc2ecf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/EqualityE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.EqualityE assignFromAnother(mrbind_test.mr.csharp.E try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_EqualityE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.EqualityE(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opEqual(mrbind_test.mr.csharp.EqualityD _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_EqualityE_MR_CSharp_EqualityD_ptr.invokeExact(rawPointer(), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java index e0e7f587..2847016a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayout.java @@ -59,6 +59,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -80,6 +81,7 @@ public void bar() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +103,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayout_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -119,6 +122,7 @@ public void opIncr() try { mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayout.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +144,7 @@ public int opAdd_ref_int(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -164,6 +169,7 @@ public mrbind_test.mr.csharp.ExposedLayout opMul(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_mul_MR_CSharp_ExposedLayout_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -187,6 +193,7 @@ public mrbind_test.mr.csharp.ExposedLayout opAdd_const_ref_int(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_C_add_const_MR_CSharp_ExposedLayout_ref_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -210,6 +217,7 @@ public boolean opLess(mrbind_test.mr.csharp.ExposedLayout _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -233,6 +241,7 @@ public boolean opEqual(float _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_equal_MR_CSharp_ExposedLayout_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -255,6 +264,7 @@ public boolean opLess(byte _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H2.MR_C_less_MR_CSharp_ExposedLayout_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java index 9ff0610e..df4f9da4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutB.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2(int _1, int _2 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_2.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), _1, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,7 +65,8 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1(mrbind_test.mr { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutB_Construct_1.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java index 2e777134..90e54ffc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/ExposedLayoutSh.java @@ -58,7 +58,8 @@ public void foo() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -79,7 +80,8 @@ public void bar() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -100,7 +102,8 @@ public static void blah() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_ExposedLayoutSh_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,7 +121,8 @@ public void opIncr() { try { - mrbind_test.ffi.MR.test_csharp.H2.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +144,7 @@ public int opAdd(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_add_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -162,6 +167,7 @@ public int opMul(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_C_mul_MR_CSharp_ExposedLayoutSh_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -184,6 +190,7 @@ public boolean opLess(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +214,7 @@ public boolean opEqual(float _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_float.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -229,6 +237,7 @@ public boolean opLess(byte _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_less_MR_CSharp_ExposedLayoutSh_char.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -252,6 +261,7 @@ public boolean opEqual(mrbind_test.mr.csharp.ExposedLayout _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh_MR_CSharp_ExposedLayout.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -276,6 +286,7 @@ public boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H3.MR_C_equal_MR_CSharp_ExposedLayoutSh.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java index 6a7ac6ab..fcad7b57 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/F.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ public mrbind_test.mr.csharp.F assignFromAnother(mrbind_test.mr.csharp.F _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.F(__ret, false, __owner); } @@ -114,6 +117,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +139,7 @@ public void bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public static void static_foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public static void static_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -190,6 +197,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -211,6 +219,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -232,6 +241,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -254,6 +264,7 @@ public void d1() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -275,6 +286,7 @@ public void d2() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -296,6 +308,7 @@ public void e1() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -317,6 +330,7 @@ public void e2() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -327,4 +341,144 @@ public void e2() java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.F dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_F_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::E`. Undefined behavior if the object isn't actually a `F`. The result refers to `object`. + * + * Calls `MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E()`. */ + public static mrbind_test.mr.csharp.F staticDowncastFromE(mrbind_test.mr.csharp.E object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_F_MutableStaticDowncastFrom_MR_CSharp_E.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.F(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java index 17d38978..c7a31e5a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.csharp; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static int test_int(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -52,6 +54,7 @@ public static boolean test_bool(boolean a, java.lang.Boolean b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void test_bool_ref(java.lang.foreign.MemorySegment a, java.lang.fo try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -87,6 +91,7 @@ public static int test_bool_ref2(java.lang.foreign.MemorySegment a, java.lang.fo try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_ref2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -105,6 +110,7 @@ public static java.lang.foreign.MemorySegment get_bool_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_get_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -123,6 +129,7 @@ public static void print_bool_ref() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_print_bool_ref.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -140,6 +147,7 @@ public static boolean test_bool_cref(boolean _1, java.lang.Boolean _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_bool_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _1), (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, _2))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0); } catch (java.lang.Throwable __e) @@ -158,6 +166,7 @@ public static java.lang.foreign.MemorySegment test_int_ref(java.lang.foreign.Mem try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -176,6 +185,7 @@ public static int test_int_cref(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -194,6 +204,7 @@ public static java.lang.foreign.MemorySegment test_int_rref(java.lang.foreign.Me try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -212,6 +223,7 @@ public static int test_int_crref(int a, java.lang.Integer b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -230,6 +242,7 @@ public static java.lang.foreign.MemorySegment test_int_ptr(java.lang.foreign.Mem try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -248,6 +261,7 @@ public static java.lang.Integer test_int_cptr(java.lang.Integer a, java.lang.Int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_int_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -266,6 +280,7 @@ public static short test_ushort(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { short __ret = (short)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort.invokeExact(a, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -284,6 +299,7 @@ public static java.lang.foreign.MemorySegment test_ushort_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -302,6 +318,7 @@ public static short test_ushort_cref(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -320,6 +337,7 @@ public static java.lang.foreign.MemorySegment test_ushort_rref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -338,6 +356,7 @@ public static short test_ushort_crref(short a, java.lang.Short b) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_crref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b))); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -356,6 +375,7 @@ public static java.lang.foreign.MemorySegment test_ushort_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -374,6 +394,7 @@ public static java.lang.Short test_ushort_cptr(java.lang.Short a, java.lang.Shor try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_ushort_cptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, a)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, b)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Short)__ret.reinterpret(2).get(java.lang.foreign.ValueLayout.JAVA_SHORT, 0); } catch (java.lang.Throwable __e) @@ -392,6 +413,7 @@ public static int test_constness_int(int _1, java.lang.Integer _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_int.invokeExact(_1, (java.lang.foreign.MemorySegment)(_2 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _2))); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -412,6 +434,7 @@ public static mrbind_test.mr.cs.std_string test_constness_str(java.lang.String _ java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); java.lang.foreign.MemorySegment __str__2 = mrbind_test.Ffi.utf8(__arena, _2); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_constness_str.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1), __str__2, mrbind_test.Ffi.end(__str__2)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -437,6 +460,7 @@ public static void test_keyword_in_param_name(int params) try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_keyword_in_param_name.invokeExact(params); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +478,7 @@ public static mrbind_test.mr.csharp.E1 test_enum(mrbind_test.mr.csharp.E1 a, mrb try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E1.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret); } catch (java.lang.Throwable __e) @@ -472,6 +497,7 @@ public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E1(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -490,6 +516,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_cref(mrbind_test.mr.csharp.E1 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -508,6 +535,7 @@ public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E1(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E1.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -526,6 +554,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_crref(mrbind_test.mr.csharp.E1 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E1.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -544,6 +573,7 @@ public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E1_ptr(jav try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E1_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -562,6 +592,7 @@ public static mrbind_test.mr.csharp.E1 test_enum_cptr(mrbind_test.mr.csharp.E1 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E1_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, b.value)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E1.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -580,6 +611,7 @@ public static mrbind_test.mr.csharp.E2 test_enum(mrbind_test.mr.csharp.E2 a, mrb try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_MR_CSharp_E2.invokeExact(java.util.Objects.requireNonNull(a, "a").value, (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret); } catch (java.lang.Throwable __e) @@ -598,6 +630,7 @@ public static java.lang.foreign.MemorySegment test_enum_ref_MR_CSharp_E2(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -616,6 +649,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_cref(mrbind_test.mr.csharp.E2 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -634,6 +668,7 @@ public static java.lang.foreign.MemorySegment test_enum_rref_MR_CSharp_E2(java.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_rref_MR_CSharp_E2.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -652,6 +687,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_crref(mrbind_test.mr.csharp.E2 try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_crref_MR_CSharp_E2.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, java.util.Objects.requireNonNull(a, "a").value), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value))); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -670,6 +706,7 @@ public static java.lang.foreign.MemorySegment test_enum_ptr_MR_CSharp_E2_ptr(jav try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_ptr_MR_CSharp_E2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -688,6 +725,7 @@ public static mrbind_test.mr.csharp.E2 test_enum_cptr(mrbind_test.mr.csharp.E2 a try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_enum_cptr_const_MR_CSharp_E2_ptr.invokeExact((java.lang.foreign.MemorySegment)(a == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, a.value)), (java.lang.foreign.MemorySegment)(b == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_BOOLEAN, b.value)), c); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : mrbind_test.mr.csharp.E2.of(__ret.reinterpret(1).get(java.lang.foreign.ValueLayout.JAVA_BOOLEAN, 0)); } catch (java.lang.Throwable __e) @@ -706,6 +744,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.Trivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -729,6 +768,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_ref(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -753,6 +793,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_cref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -777,6 +818,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_rref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -801,6 +843,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_crref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -825,6 +868,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_ptr(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -849,6 +893,7 @@ public static mrbind_test.mr.csharp.Trivial test_class_trivial_cptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_trivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } @@ -873,6 +918,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.NonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -896,6 +942,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ref(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -920,6 +967,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -944,6 +992,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_rref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -968,6 +1017,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_crref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -992,6 +1042,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_ptr(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -1016,6 +1067,7 @@ public static mrbind_test.mr.csharp.NonTrivial test_class_nontrivial_cptr(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_nontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -1040,6 +1092,7 @@ public static java.lang.foreign.MemorySegment test_void_ptr(java.lang.foreign.Me try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1058,6 +1111,7 @@ public static java.lang.foreign.MemorySegment test_void_cptr(java.lang.foreign.M try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_void_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1076,6 +1130,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE mark_se_as_shared() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_se_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1095,6 +1150,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1118,6 +1174,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ref(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1142,6 +1199,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1166,6 +1224,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_rref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1190,6 +1249,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_crref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1214,6 +1274,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_ptr(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1237,6 +1298,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA test_shptr_cptr(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SA(__ret, false, __owner); } @@ -1260,6 +1322,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1283,6 +1346,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1307,6 +1371,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1331,6 +1396,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_rr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1355,6 +1421,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1379,6 +1446,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_pt try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1402,6 +1470,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA test_shcptr_cp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_shcptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_shared_ptr_const_MR_CSharp_SA(__ret, false, __owner); } @@ -1425,6 +1494,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG mark_sg_as_shared() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_mark_sg_as_shared.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_SG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1445,6 +1515,7 @@ public static mrbind_test.mr.cs.std_string test_string(java.lang.String a, java. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1463,6 +1534,7 @@ public static mrbind_test.mr.cs.std_string test_string_ref(mrbind_test.mr.cs.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1489,6 +1561,7 @@ public static mrbind_test.mr.cs.std_string test_string_cref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1510,6 +1583,7 @@ public static mrbind_test.mr.cs.std_string test_string_rref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1531,6 +1605,7 @@ public static mrbind_test.mr.cs.std_string test_string_crref(java.lang.String a, java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1550,6 +1625,7 @@ public static mrbind_test.mr.cs.std_string test_string_ptr(mrbind_test.mr.cs.std try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1573,6 +1649,7 @@ public static mrbind_test.mr.cs.std_string test_string_cptr(mrbind_test.mr.cs.st try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_string_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -1598,6 +1675,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview(java.lang.String java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1616,6 +1694,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1642,6 +1721,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_cref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1663,6 +1743,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_rref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1684,6 +1765,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_crref(java.lang. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1703,6 +1785,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_ptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1726,6 +1809,7 @@ public static mrbind_test.mr.cs.std_string_view test_stringview_cptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_stringview_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string_view(__ret, false, __owner); } @@ -1751,6 +1835,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath(java.lang.String java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -1769,6 +1854,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1795,6 +1881,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1816,6 +1903,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_rref(java.lang.S java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_rref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1837,6 +1925,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_crref(java.lang. java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __str_b = mrbind_test.Ffi.utf8(__arena, b); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_crref.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a), __str_b, mrbind_test.Ffi.end(__str_b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1856,6 +1945,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_ptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1879,6 +1969,7 @@ public static mrbind_test.mr.cs.std_filesystem_path test_fspath_cptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_fspath_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_filesystem_path(__ret, false, __owner); } @@ -1902,6 +1993,7 @@ public static int opIncr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1924,6 +2016,7 @@ public static int opPostIncr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_incr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1946,6 +2039,7 @@ public static int opDecr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1968,6 +2062,7 @@ public static int opPostDecr(mrbind_test.mr.csharp.IncrDecrI _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_post_decr_MR_CSharp_IncrDecrI.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1990,6 +2085,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsA _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsA_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2012,6 +2108,7 @@ public static void opAdd(mrbind_test.mr.csharp.StaticOpsLhsB _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsB_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2033,6 +2130,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsC _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsC_int.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_1, "_1").release(), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2055,6 +2153,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsD _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsD_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2077,6 +2176,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsE _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsE_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2099,6 +2199,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsF _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsF_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2121,6 +2222,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsG _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsG_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2143,6 +2245,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsLhsH _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsLhsH_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2165,6 +2268,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsA _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsA.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2187,6 +2291,7 @@ public static void opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsB _2) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsB.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2208,6 +2313,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsC _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsC.invokeExact(_1, mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_2, "_2").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2230,6 +2336,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsD _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsD.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2252,6 +2359,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsE _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsE.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2274,6 +2382,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsF _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsF.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2296,6 +2405,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsG _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsG.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2318,6 +2428,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.StaticOpsRhsH _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_StaticOpsRhsH.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2341,6 +2452,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsEnum _1, int _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsEnum_int.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2360,6 +2472,7 @@ public static int opAdd(mrbind_test.mr.csharp.StaticOpsMixedLhs _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_StaticOpsMixedLhs_MR_CSharp_StaticOpsMixedRhs.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2383,6 +2496,7 @@ public static int opAdd(mrbind_test.mr.csharp.NonTrivialClassOps _1, float _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonTrivialClassOps_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2405,6 +2519,7 @@ public static int opAdd(float _1, mrbind_test.mr.csharp.NonTrivialClassOps _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_float_MR_CSharp_NonTrivialClassOps.invokeExact(_1, mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2427,6 +2542,7 @@ public static int opAdd(mrbind_test.mr.csharp.NonCopyableClassByValueOps _1, int try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_MR_CSharp_NonCopyableClassByValueOps_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2449,6 +2565,7 @@ public static int opAdd(int _1, mrbind_test.mr.csharp.NonCopyableClassByValueOps try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_add_int_MR_CSharp_NonCopyableClassByValueOps.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2471,6 +2588,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2494,6 +2612,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ref(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2518,6 +2637,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cref( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2542,6 +2662,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_ptr(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2566,6 +2687,7 @@ public static mrbind_test.mr.csharp.ConvCtorTrivial test_class_convtrivial_cptr( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convtrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorTrivial(__ret, false, __owner); } @@ -2590,6 +2712,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2613,6 +2736,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2637,6 +2761,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2661,6 +2786,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2685,6 +2811,7 @@ public static mrbind_test.mr.csharp.ConvCtorNonTrivial test_class_convnontrivial try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_class_convnontrivial_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ConvCtorNonTrivial(__ret, false, __owner); } @@ -2709,6 +2836,7 @@ public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2731,6 +2859,7 @@ public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2753,6 +2882,7 @@ public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayout _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayout.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -2775,6 +2905,7 @@ public static void opDecr(mrbind_test.mr.csharp.ExposedLayout _1) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -2796,6 +2927,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayout.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayout(__ret, null); } catch (java.lang.Throwable __e) @@ -2819,6 +2951,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ref(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2843,6 +2976,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayout.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2867,6 +3001,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_rref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_rref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2891,6 +3026,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_crref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_crref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2915,6 +3051,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_ptr(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2939,6 +3076,7 @@ public static mrbind_test.mr.csharp.ExposedLayout test_exposed_cptr(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayout_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -2964,6 +3102,7 @@ public static mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout test_exposed_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_vec.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_ExposedLayout(__ret, true, null); } catch (java.lang.Throwable __e) @@ -2984,6 +3123,7 @@ public static mrbind_test.mr.csharp.NonTrivial asave_ref_in_exposed_layout(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_asave_ref_in_exposed_layout.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } @@ -3007,6 +3147,7 @@ public static int opSub(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_sub_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3029,6 +3170,7 @@ public static int opDiv(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_div_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3051,6 +3193,7 @@ public static int opMod(int _1, mrbind_test.mr.csharp.ExposedLayoutSh _2) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H0.MR_C_mod_int_MR_CSharp_ExposedLayoutSh.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3073,6 +3216,7 @@ public static void opDecr(mrbind_test.mr.csharp.ExposedLayoutSh _1) try { mrbind_test.ffi.MR.test_csharp.H0.MR_C_decr_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -3094,6 +3238,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh make_ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_make_exposed_sh.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3112,6 +3257,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_MR_CSharp_ExposedLayoutSh.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret, null); } catch (java.lang.Throwable __e) @@ -3135,6 +3281,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ref(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3159,6 +3306,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cref(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cref_MR_CSharp_ExposedLayoutSh.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3183,6 +3331,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_ptr(mrbind_test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_ptr_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3207,6 +3356,7 @@ public static mrbind_test.mr.csharp.ExposedLayoutSh test_exposed_cptr(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_exposed_cptr_const_MR_CSharp_ExposedLayoutSh_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayoutSh(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayoutSh.LAYOUT.byteSize()), __owner); } @@ -3232,6 +3382,7 @@ public static boolean opEqual(mrbind_test.mr.csharp.ExposedLayoutB _1, mrbind_te try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_C_equal_MR_CSharp_ExposedLayoutB.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -3255,6 +3406,7 @@ public static mrbind_test.mr.cs.std_optional_int test_optint(int a, mrbind_test. try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3278,6 +3430,7 @@ public static mrbind_test.mr.cs.std_optional_int test_optint_ref(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); } @@ -3302,6 +3455,7 @@ public static mrbind_test.mr.cs.std_optional_int test_optint_cref(int a, mrbind_ try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, a), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); } @@ -3325,6 +3479,7 @@ public static mrbind_test.mr.cs.std_optional_int test_optint_ptr(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); } @@ -3349,6 +3504,7 @@ public static mrbind_test.mr.cs.std_optional_int test_optint_cptr(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optint_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_int(__ret, false, __owner); } @@ -3373,6 +3529,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3396,6 +3553,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ref(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3420,6 +3578,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cref(java.la try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cref.invokeExact(a, a_end, (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3443,6 +3602,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_ptr(mrbind_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3467,6 +3627,7 @@ public static mrbind_test.mr.cs.std_optional_std_string test_optstr_cptr(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optstr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_std_string(__ret, false, __owner); } @@ -3491,6 +3652,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3515,6 +3677,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ref( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3539,6 +3702,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cref try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3563,6 +3727,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_ptr( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3587,6 +3752,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial test_opttriv_cptr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_opttriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_Trivial(__ret, false, __owner); } @@ -3611,6 +3777,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b), (int)(c == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3635,6 +3802,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3659,6 +3827,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cref.invokeExact((int)(a == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(a), (int)(b == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3683,6 +3852,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3707,6 +3877,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial test_optnontri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optnontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_NonTrivial(__ret, false, __owner); } @@ -3731,6 +3902,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3755,6 +3927,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3779,6 +3952,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3803,6 +3977,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3827,6 +4002,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh test_opts try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshexp_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_ExposedLayoutSh(__ret, false, __owner); } @@ -3851,6 +4027,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b), mrbind_test.Ffi.ptr(c)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -3875,6 +4052,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3899,6 +4077,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cref(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3923,6 +4102,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_ptr(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3947,6 +4127,7 @@ public static mrbind_test.mr.cs.std_optional_MR_CSharp_SA test_optshtriv_cptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_optshtriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_optional_MR_CSharp_SA(__ret, false, __owner); } @@ -3972,6 +4153,7 @@ public static void test_tag() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -3989,6 +4171,7 @@ public static void test_tag_cref() try { mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cref.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -4006,6 +4189,7 @@ public static boolean test_tag_ptr() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_ptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4024,6 +4208,7 @@ public static boolean test_tag_cptr() try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_tag_cptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4042,6 +4227,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4065,6 +4251,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); } @@ -4089,6 +4276,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); } @@ -4113,6 +4301,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_ptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); } @@ -4136,6 +4325,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float test_variant try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_cptr.invokeExact(mrbind_test.Ffi.ptr(a), b); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = a; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, false, __owner); } @@ -4160,6 +4350,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float_float test_v try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_variant_with_repeated_types.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4179,6 +4370,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_ref(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4202,6 +4394,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_ptr(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_ptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4225,6 +4418,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_cref(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4248,6 +4442,7 @@ public static mrbind_test.mr.cs.std_ostream test_iostreams_cptr(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_iostreams_cptr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_ostream(__ret, __owner); } @@ -4271,6 +4466,7 @@ public static java.lang.foreign.MemorySegment test_uniqueptr(java.lang.foreign.M try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4289,6 +4485,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ref(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ref.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4307,6 +4504,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cref(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); } @@ -4331,6 +4529,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_ptr(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_ptr.invokeExact(java.util.Objects.requireNonNull(a, "a").release(), java.util.Objects.requireNonNull(b, "b").release(), c); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unique_ptr_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -4349,6 +4548,7 @@ public static mrbind_test.mr.cs.std_unique_ptr_int test_uniqueptr_cptr(mrbind_te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H0.MR_CSharp_test_uniqueptr_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_unique_ptr_int(__ret, false, __owner); } @@ -4373,6 +4573,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_ref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4391,6 +4592,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_cref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4409,6 +4611,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_rref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4427,6 +4630,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_crref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4445,6 +4649,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_ptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4463,6 +4668,7 @@ public static java.lang.foreign.MemorySegment test_plainarr_cptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4481,6 +4687,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_ref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4499,6 +4706,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_cref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4517,6 +4725,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_rref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_rref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4535,6 +4744,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_crref(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_crref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4553,6 +4763,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_ptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4571,6 +4782,7 @@ public static java.lang.foreign.MemorySegment test_plainarr2_cptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarr2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4589,6 +4801,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_ref(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4607,6 +4820,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_cref(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4625,6 +4839,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_ptr(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4643,6 +4858,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum_cptr(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4661,6 +4877,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_ref(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4679,6 +4896,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_cref(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4697,6 +4915,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_ptr(java.lang.f try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4715,6 +4934,7 @@ public static java.lang.foreign.MemorySegment test_plainarrenum2_cptr(java.lang. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_plainarrenum2_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4734,6 +4954,7 @@ public static java.lang.foreign.MemorySegment test_ptrs1(java.lang.foreign.Memor try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs1.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4752,6 +4973,7 @@ public static java.lang.foreign.MemorySegment test_ptrs2(java.lang.foreign.Memor try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_ptrs2.invokeExact(ptr, ref); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4770,6 +4992,7 @@ public static java.lang.foreign.MemorySegment test_intptr_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4788,6 +5011,7 @@ public static java.lang.foreign.MemorySegment test_intptr_cref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4806,6 +5030,7 @@ public static java.lang.foreign.MemorySegment test_intptr_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4824,6 +5049,7 @@ public static java.lang.foreign.MemorySegment test_intptr_cptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4842,6 +5068,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4860,6 +5087,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4878,6 +5106,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4896,6 +5125,7 @@ public static java.lang.foreign.MemorySegment test_intcptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4914,6 +5144,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_ref(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4932,6 +5163,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_cref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4950,6 +5182,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_ptr(java.lang.forei try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4968,6 +5201,7 @@ public static java.lang.foreign.MemorySegment test_intptrptr_cptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_intptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -4986,6 +5220,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5004,6 +5239,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5022,6 +5258,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5040,6 +5277,7 @@ public static java.lang.foreign.MemorySegment test_voidptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5058,6 +5296,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_ref(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5076,6 +5315,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_cref(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5094,6 +5334,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_ptr(java.lang.fore try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5112,6 +5353,7 @@ public static java.lang.foreign.MemorySegment test_voidptrptr_cptr(java.lang.for try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_voidptrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5130,6 +5372,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_ref(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5148,6 +5391,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_cref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5166,6 +5410,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5184,6 +5429,7 @@ public static java.lang.foreign.MemorySegment test_arrptr_cptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5202,6 +5448,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_ref(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5220,6 +5467,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_cref(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cref.invokeExact(a, b); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5238,6 +5486,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_ptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5256,6 +5505,7 @@ public static java.lang.foreign.MemorySegment test_arrcptr_cptr(java.lang.foreig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_arrcptr_cptr.invokeExact(a, b, c); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5274,6 +5524,7 @@ public static void nameConflicts() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflicts.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5291,6 +5542,7 @@ public static void nameConflictsExposed() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_nameConflictsExposed.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5309,6 +5561,7 @@ public static void template_a(int _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5327,6 +5580,7 @@ public static void template_a(float _1) try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_a_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5344,6 +5598,7 @@ public static int template_b_int() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_int.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5362,6 +5617,7 @@ public static float template_b_float() try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5380,6 +5636,7 @@ public static void template_c_int() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_int.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5397,6 +5654,7 @@ public static void template_c_float() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_template_c_float.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5414,6 +5672,7 @@ public static void instantiate() try { mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_instantiate.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5431,6 +5690,7 @@ public static int opNeg_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csha try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5453,6 +5713,7 @@ public static int opNeg_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.m try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_neg_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5476,6 +5737,7 @@ public static void opNot_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test.mr.csh try { mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5497,6 +5759,7 @@ public static void opNot_const_MR_CSharp_ConstNonconstConflicts_ref(mrbind_test. try { mrbind_test.ffi.MR.test_csharp.H1.MR_C_not_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -5518,6 +5781,7 @@ public static int opBitand_int_MR_CSharp_ConstNonconstConflicts_ref(int _1, mrbi try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5540,6 +5804,7 @@ public static int opBitand_int_const_MR_CSharp_ConstNonconstConflicts_ref(int _1 try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H1.MR_C_bitand_int_const_MR_CSharp_ConstNonconstConflicts_ref.invokeExact(_1, mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5563,6 +5828,7 @@ public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5586,6 +5852,7 @@ public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5609,6 +5876,7 @@ public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_const_MR_CSharp_LifetimesB_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = b; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5633,6 +5901,7 @@ public static mrbind_test.mr.csharp.LifetimesA begin(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5656,6 +5925,7 @@ public static mrbind_test.mr.csharp.LifetimesA end(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_LifetimesC_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5679,6 +5949,7 @@ public static mrbind_test.mr.csharp.LifetimesA opMul(mrbind_test.mr.csharp.Lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_C_deref_MR_CSharp_LifetimesC.invokeExact(mrbind_test.Ffi.ptrNonNull(c, "c")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = c; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -5702,6 +5973,7 @@ public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableD self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5724,6 +5996,7 @@ public static java.lang.Integer end(mrbind_test.mr.csharp.IterableD self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableD_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5746,6 +6019,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.csharp.Iterab try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5768,6 +6042,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.csharp.Iterable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableE_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5790,6 +6065,7 @@ public static java.lang.Integer begin_const_MR_CSharp_IterableF_ref(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5812,6 +6088,7 @@ public static java.lang.Integer end_const_MR_CSharp_IterableF_ref(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_const_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5834,6 +6111,7 @@ public static java.lang.foreign.MemorySegment begin_MR_CSharp_IterableF_ref(mrbi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5856,6 +6134,7 @@ public static java.lang.foreign.MemorySegment end_MR_CSharp_IterableF_ref(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_MR_CSharp_IterableF_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -5878,6 +6157,7 @@ public static java.lang.Integer begin(mrbind_test.mr.csharp.IterableL_int self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_begin_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5900,6 +6180,7 @@ public static java.lang.Integer end(mrbind_test.mr.csharp.IterableL_int self) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_end_int.invokeExact(mrbind_test.Ffi.ptrNonNull(self, "self")); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -5924,6 +6205,7 @@ public static mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr test_vec_of_mut_ptr_t try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_mut_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_CSharp_A_ptr(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5942,6 +6224,7 @@ public static mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr test_vec_of_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_vec_of_const_ptr_to_class.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_const_MR_CSharp_A_ptr(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5961,6 +6244,7 @@ public static mrbind_test.mr.cs.std_tuple get_tuple0() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple0.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5979,6 +6263,7 @@ public static mrbind_test.mr.cs.std_tuple_int get_tuple1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple1.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -5997,6 +6282,7 @@ public static mrbind_test.mr.cs.std_tuple_int_std_string get_tuple2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6015,6 +6301,7 @@ public static mrbind_test.mr.cs.std_pair_int_std_string get_pair2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_pair2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6033,6 +6320,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int_std_string get_tuple_const() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_const.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6051,6 +6339,7 @@ public static mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_refs.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int_ref_float_rvalue_ref_std_string_ref_std_string_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6069,6 +6358,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_crefs.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int_ref_const_float_rvalue_ref_const_std_string_ref_const_std_string_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6087,6 +6377,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CShar try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_value.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_const_MR_CSharp_ExposedLayout(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6105,6 +6396,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_C try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_lvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_ref_const_MR_CSharp_ExposedLayout_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6123,6 +6415,7 @@ public static mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_get_tuple_exposed_rvalue_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_MR_CSharp_ExposedLayout_rvalue_ref_const_MR_CSharp_ExposedLayout_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6141,6 +6434,7 @@ public static mrbind_test.mr.cs.std_expected_int_float test_expected_int(mrbind_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6164,6 +6458,7 @@ public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ref(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); } @@ -6188,6 +6483,7 @@ public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cref(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); } @@ -6212,6 +6508,7 @@ public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_ptr(mrb try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); } @@ -6236,6 +6533,7 @@ public static mrbind_test.mr.cs.std_expected_int_float test_expected_int_cptr(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_int_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_int_float(__ret, false, __owner); } @@ -6260,6 +6558,7 @@ public static mrbind_test.mr.cs.std_expected_void_float test_expected_void(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6283,6 +6582,7 @@ public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ref(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); } @@ -6307,6 +6607,7 @@ public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cref( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); } @@ -6331,6 +6632,7 @@ public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_ptr(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); } @@ -6355,6 +6657,7 @@ public static mrbind_test.mr.cs.std_expected_void_float test_expected_void_cptr( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_void_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_void_float(__ret, false, __owner); } @@ -6379,6 +6682,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_en try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6402,6 +6706,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_en try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6426,6 +6731,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_en try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6450,6 +6756,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_en try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6474,6 +6781,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float test_expected_en try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_enum_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_E1_float(__ret, false, __owner); } @@ -6498,6 +6806,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expect try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6521,6 +6830,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expect try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6545,6 +6855,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expect try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6569,6 +6880,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expect try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6593,6 +6905,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float test_expect try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_triv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_Trivial_float(__ret, false, __owner); } @@ -6617,6 +6930,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_exp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(a, "a"), (int)(b == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6640,6 +6954,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_exp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6664,6 +6979,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_exp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6688,6 +7004,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_exp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6712,6 +7029,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float test_exp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_nontriv_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_NonTrivial_float(__ret, false, __owner); } @@ -6736,6 +7054,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_sh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6759,6 +7078,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_sh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6783,6 +7103,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_sh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6807,6 +7128,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_sh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6831,6 +7153,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float test_expected_sh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_SA_float(__ret, false, __owner); } @@ -6855,6 +7178,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6878,6 +7202,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6902,6 +7227,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6926,6 +7252,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6950,6 +7277,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float test_ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayout_float(__ret, false, __owner); } @@ -6974,6 +7302,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -6997,6 +7326,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7021,6 +7351,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cref.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a"), mrbind_test.Ffi.ptr(b)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7045,6 +7376,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_ptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } @@ -7069,6 +7401,7 @@ public static mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H1.MR_CSharp_test_expected_exposed_shared_cptr.invokeExact(mrbind_test.Ffi.ptr(a), mrbind_test.Ffi.ptr(b), c); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_expected_MR_CSharp_ExposedLayoutSh_float(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java index 24cf0427..5883f28f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/G.java @@ -45,6 +45,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ public mrbind_test.mr.csharp.G assignFromAnother(mrbind_test.mr.csharp.G _other) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.G(__ret, false, __owner); } @@ -116,6 +119,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -137,6 +141,7 @@ public void bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -158,6 +163,7 @@ public static void static_foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +181,7 @@ public static void static_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_static_bar.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -192,6 +199,7 @@ public void virtual_foo() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -213,6 +221,7 @@ public void virtual_bar(int _1, int _2) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_virtual_bar.invokeExact(rawPointer(), _1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -234,6 +243,7 @@ public java.lang.foreign.MemorySegment refs(java.lang.foreign.MemorySegment x, j try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_refs.invokeExact(rawPointer(), x, _2); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -256,6 +266,7 @@ public void d1() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -277,6 +288,7 @@ public void d2() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_d2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -298,6 +310,7 @@ public void e1() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -319,6 +332,127 @@ public void e2() try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_e2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Upcasts to the base class `MR::CSharp::A`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_A()`. */ + public mrbind_test.mr.csharp.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_A.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::A`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::A`. Returns null if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A()`. */ + public static mrbind_test.mr.csharp.G dynamicDowncastFromA(mrbind_test.mr.csharp.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableDynamicDowncastFrom_MR_CSharp_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::D`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_D()`. */ + public mrbind_test.mr.csharp.D upcastToD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_D.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.D(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::D`. Undefined behavior if the object isn't actually a `G`. The result refers to `object`. + * + * Calls `MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D()`. */ + public static mrbind_test.mr.csharp.G staticDowncastFromD(mrbind_test.mr.csharp.D object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableStaticDowncastFrom_MR_CSharp_D.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.G(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::E`. The result refers to this object. + * + * Calls `MR_CSharp_G_MutableUpcastTo_MR_CSharp_E()`. */ + public mrbind_test.mr.csharp.E upcastToE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_G_MutableUpcastTo_MR_CSharp_E.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.E(__ret, false, this); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java index fb59f58d..ccc9dfd1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrA.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrA assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrA opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrA opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrA opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrA(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrA opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrA(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java index 481d85d5..9fac5969 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IncrDecrB assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public mrbind_test.mr.csharp.IncrDecrB opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -133,6 +137,7 @@ public mrbind_test.mr.csharp.IncrDecrB opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public mrbind_test.mr.csharp.IncrDecrB opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrB(__ret, false, __owner); } @@ -178,6 +184,7 @@ public mrbind_test.mr.csharp.IncrDecrB opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrB(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java index 04381a7c..222695d9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrC.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrC assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrC opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrC opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrC opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrC(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrC opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrC(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java index 0c342127..12a31479 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrD.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.IncrDecrD assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IncrDecrD opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.IncrDecrD opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public mrbind_test.mr.csharp.IncrDecrD opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrD(__ret, false, __owner); } @@ -179,6 +185,7 @@ public mrbind_test.mr.csharp.IncrDecrD opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrD.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrD(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java index 5bf4f92e..fab05d1a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrE opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrE opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrE opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrE(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrE opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrE.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrE(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java index 0656b24b..550cf599 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrF opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrF opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrF opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrF(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrF opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrF.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrF(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java index 0dbcefea..ad9c1ba9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrG opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrG opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrG opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrG(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrG opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrG.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrG(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java index 6bcf3bf8..9bab68a8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrH.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IncrDecrH opIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); } @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.IncrDecrH opPostIncr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_incr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public mrbind_test.mr.csharp.IncrDecrH opDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrH(__ret, false, __owner); } @@ -153,6 +158,7 @@ public mrbind_test.mr.csharp.IncrDecrH opPostDecr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_C_post_decr_MR_CSharp_IncrDecrH.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IncrDecrH(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java index 6aa6c10e..c9f2631b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IncrDecrI.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IncrDecrI assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IncrDecrI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IncrDecrI(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java index b04408bf..d345a99d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.IndexerA assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -133,6 +137,7 @@ public java.lang.foreign.MemorySegment index(int i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java index 9b54a2fc..4961db4e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.IndexerB assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerB(__ret, false, __owner); } @@ -137,6 +141,7 @@ public mrbind_test.mr.csharp.IndexerA index_1(int i) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_1.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -160,6 +165,7 @@ public mrbind_test.mr.csharp.IndexerA index_2(int i, int j) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_2.invokeExact(rawPointer(), i, j); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -183,6 +189,7 @@ public mrbind_test.mr.csharp.IndexerA index_0() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_index_0.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -207,6 +214,7 @@ public mrbind_test.mr.csharp.IndexerA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerA(__ret, false, __owner); } @@ -231,6 +239,7 @@ public void setA(mrbind_test.mr.csharp.IndexerA value) try { mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java index ad8df4b1..5ae4eaea 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IndexerC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.IndexerC assignFromAnother(mrbind_test.mr.csharp.In try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IndexerC(__ret, false, __owner); } @@ -109,6 +112,7 @@ public int index_mut(int i) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index_mut.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public float index(int i) try { float __ret = (float)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IndexerC_index.invokeExact(rawPointer(), i); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java index fad994af..b2f3e28f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableA assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableA(__ret, false, __owner); } @@ -110,6 +113,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableA_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java index cd6c73cc..bfc1172c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableB assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableB_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java index 46b91147..856d34c5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableC assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableC(__ret, false, __owner); } @@ -110,6 +113,7 @@ public java.lang.foreign.MemorySegment begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -176,6 +182,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -221,6 +229,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableC_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java index a4b5795f..c0f3717f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableD assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableD(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableD_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java index 54727fbe..500f3a32 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableE assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableE(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableE_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java index 1d209312..38e8a875 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableF assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableF(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableF_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java index 771edab9..713a2a0f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableG.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableG assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableG(__ret, false, __owner); } @@ -110,6 +113,7 @@ public mrbind_test.mr.cs.std_string begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -133,6 +137,7 @@ public mrbind_test.mr.cs.std_string end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -156,7 +161,8 @@ public mrbind_test.mr.cs.std_string arr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -179,7 +185,8 @@ public static long arrSize() { try { - long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableG_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java index 5f67973f..176f44d3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableH.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,7 +63,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ public mrbind_test.mr.csharp.IterableH assignFromAnother(mrbind_test.mr.csharp.I { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableH(__ret, false, __owner); } @@ -110,7 +113,8 @@ public mrbind_test.mr.cs.std_string begin() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -133,7 +137,8 @@ public mrbind_test.mr.cs.std_string end() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -157,7 +162,8 @@ public mrbind_test.mr.cs.std_string arr() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -180,7 +186,8 @@ public static long arrSize() { try { - long __ret = (long)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableH_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java index 0348aeca..7332f17f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableI.java @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,7 +63,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ public mrbind_test.mr.csharp.IterableI assignFromAnother(mrbind_test.mr.csharp.I { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableI(__ret, false, __owner); } @@ -109,7 +112,8 @@ public mrbind_test.mr.csharp.ExposedLayout begin() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -132,7 +136,8 @@ public mrbind_test.mr.csharp.ExposedLayout end() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H3.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -157,6 +162,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -180,6 +186,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableI_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java index 0d50b659..af968529 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableJ.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableJ assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableJ(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.ExposedLayout begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -134,6 +138,7 @@ public mrbind_test.mr.csharp.ExposedLayout end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -158,6 +163,7 @@ public mrbind_test.mr.csharp.ExposedLayout arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.ExposedLayout(__ret.reinterpret(mrbind_test.mr.csharp.ExposedLayout.LAYOUT.byteSize()), __owner); } @@ -181,6 +187,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableJ_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java index 19234ae4..d55115ef 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableK assignFromAnother(mrbind_test.mr.csharp.I try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK(__ret, false, __owner); } @@ -111,6 +114,7 @@ public mrbind_test.mr.csharp.IterableK_Iter begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IterableK_Iter(__ret, true, null); } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public mrbind_test.mr.csharp.IterableK_Sentinel end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, true, null); } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -178,6 +184,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java index 381f82fe..2c9f8308 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Iter.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.IterableK_Iter assignFromAnother(mrbind_test.mr.csh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK_Iter(__ret, false, __owner); } @@ -133,6 +137,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public void opIncr() try { mrbind_test.ffi.MR.test_csharp.H4.MR_C_incr_MR_CSharp_IterableK_Iter.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -176,6 +182,7 @@ public boolean opEqual(mrbind_test.mr.csharp.IterableK_Sentinel s) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_equal_MR_CSharp_IterableK_Iter_MR_CSharp_IterableK_Sentinel.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(s, "s")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -200,6 +207,7 @@ public java.lang.foreign.MemorySegment ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -223,6 +231,7 @@ public void setPtr(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Iter_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java index e78d1451..bc28814d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableK_Sentinel.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.fo try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFrom.invokeExact(ptr); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.IterableK_Sentinel assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableK_Sentinel(__ret, false, __owner); } @@ -134,6 +138,7 @@ public java.lang.foreign.MemorySegment ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Get_ptr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public void setPtr(java.lang.foreign.MemorySegment value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableK_Sentinel_Set_ptr.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java index 8b0803c1..9780bb85 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/IterableL_int.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.IterableL_int assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.IterableL_int(__ret, false, __owner); } @@ -110,6 +113,7 @@ public java.lang.Integer begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public java.lang.Integer end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.address() == 0 ? null : (java.lang.Integer)__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_IterableL_int_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java index 98747191..72d0d2b5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.LifetimesA assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -135,6 +139,7 @@ public java.lang.foreign.MemorySegment foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -158,6 +163,7 @@ public void bar(java.lang.foreign.MemorySegment ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_bar.invokeExact(rawPointer(), ref); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -180,6 +186,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -202,6 +209,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesA_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java index 75ab3901..d11eb85a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesB.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.LifetimesB assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesB(__ret, false, __owner); } @@ -138,6 +142,7 @@ public mrbind_test.mr.csharp.LifetimesA begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -161,6 +166,7 @@ public mrbind_test.mr.csharp.LifetimesA end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -184,6 +190,7 @@ public mrbind_test.mr.csharp.LifetimesA opMul() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_C_deref_MR_CSharp_LifetimesB_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -208,6 +215,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -232,6 +240,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesB_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java index 3d0aad96..cac6fc8d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesC.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.LifetimesC assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesC(__ret, false, __owner); } @@ -138,6 +142,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -162,6 +167,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesC_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java index 655c49af..5125b7e6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_2(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_2.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -98,6 +100,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_Life try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesA.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -128,6 +131,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_1_MR_CSharp_Life try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Construct_1_MR_CSharp_LifetimesB.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +155,7 @@ public mrbind_test.mr.csharp.LifetimesD assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesD(__ret, false, __owner); } @@ -176,6 +181,7 @@ public mrbind_test.mr.csharp.LifetimesA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -200,7 +206,8 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); - java.lang.Object __owner = this; + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -225,6 +232,7 @@ public static mrbind_test.mr.csharp.LifetimesA return_ref_static(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_return_ref_static.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -249,6 +257,7 @@ public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -272,6 +281,7 @@ public void store_ref_in_param(mrbind_test.mr.csharp.LifetimesA ref, mrbind_test try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_ref_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref"), mrbind_test.Ffi.ptrNonNull(other_ref, "other_ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -296,6 +306,7 @@ public void store_this_in_param(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_store_this_in_param.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -319,6 +330,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -343,6 +355,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesD_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java index a2562095..d0e24f9a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/LifetimesE.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ public mrbind_test.mr.csharp.LifetimesE assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesE(__ret, false, __owner); } @@ -116,6 +119,7 @@ public mrbind_test.mr.csharp.LifetimesA get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_get.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -140,7 +144,8 @@ public mrbind_test.mr.csharp.LifetimesA return_ref(mrbind_test.mr.csharp.Lifetim try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_return_ref.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); - java.lang.Object __owner = this; + mrbind_test.Ffi.checkException(); + java.lang.Object __owner = ref; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } catch (java.lang.Throwable __e) @@ -165,6 +170,7 @@ public void store_ref_in_this(mrbind_test.mr.csharp.LifetimesA ref) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_store_ref_in_this.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -188,6 +194,7 @@ public mrbind_test.mr.csharp.LifetimesA a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.LifetimesA(__ret, false, __owner); } @@ -212,6 +219,7 @@ public void setA(mrbind_test.mr.csharp.LifetimesA value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_LifetimesE_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java index 1e73d688..c770217a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int name_con try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFrom.invokeExact(name_conflicts, mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public mrbind_test.mr.csharp.NameConflicts assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts(__ret, false, __owner); } @@ -138,6 +142,7 @@ public void name_Conflicts() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_name_Conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +165,7 @@ public int name_conflicts() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_name_conflicts.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public void setName_conflicts(int value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_name_conflicts.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -204,6 +211,7 @@ public mrbind_test.mr.csharp.NameConflicts_A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); } @@ -228,6 +236,7 @@ public void setA(mrbind_test.mr.csharp.NameConflicts_A value) try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java index 9101fee3..ed36e0b6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflictsExposed.java @@ -39,6 +39,7 @@ public void name_Conflicts_exposed() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflictsExposed_name_Conflicts_exposed.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java index 55f6ac0c..5509b45d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NameConflicts_A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NameConflicts_A assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NameConflicts_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NameConflicts_A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java index 1c853993..0a0ec816 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonCopyableClassByValueOps.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.NonCopyableClassByValueOps assignFromAnother(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonCopyableClassByValueOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonCopyableClassByValueOps(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java index 625b75e9..5386faed 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NonTrivial assignFromAnother(mrbind_test.mr.csharp. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java index 22825c20..bce36943 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialClassOps.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.NonTrivialClassOps assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialClassOps_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivialClassOps(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opAdd(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_add_MR_CSharp_NonTrivialClassOps_int.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java index 484ff171..e39518cb 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/NonTrivialDerived.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.NonTrivialDerived assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_NonTrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.NonTrivialDerived(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java index 0ad391df..7a71aae8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.Outer assignFromAnother(mrbind_test.mr.csharp.Outer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Outer(__ret, false, __owner); } @@ -110,6 +113,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java index 357fc310..dbe7d65e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Outer_Inner.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.Outer_Inner assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Outer_Inner(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void bar() try { mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_Outer_Inner_bar.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java index 96429cf4..f2e53f39 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalA assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalA(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalA _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java index 0d33f09a..766167ac 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalB assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalB(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalB _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalB.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java index b1e3f4a8..885fd8ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalC assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalC(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -157,6 +162,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java index 92abdcb6..43a4ebbe 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalD assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalD(__ret, false, __owner); } @@ -110,6 +113,7 @@ public boolean opLess(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -133,6 +137,7 @@ public boolean opGreater(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -156,6 +161,7 @@ public boolean opLessEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -179,6 +185,7 @@ public boolean opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalD_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java index d3c0bff1..e7f51184 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalE.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalE_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.RelationalE assignFromAnother(mrbind_test.mr.csharp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalE(__ret, false, __owner); } @@ -109,7 +112,8 @@ public int opLess(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,7 +136,8 @@ public int opGreater(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,7 +160,8 @@ public int opLessEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -178,7 +184,8 @@ public int opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_equal_MR_CSharp_RelationalE_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java index faeb0cc5..e956e60f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/RelationalF.java @@ -16,7 +16,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,7 +63,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,7 +87,8 @@ public mrbind_test.mr.csharp.RelationalF assignFromAnother(mrbind_test.mr.csharp { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_RelationalF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.RelationalF(__ret, false, __owner); } @@ -109,7 +112,8 @@ public void opLess(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,7 +135,8 @@ public void opGreater(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,7 +158,8 @@ public void opLessEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_less_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,7 +181,8 @@ public void opGreaterEqual(mrbind_test.mr.csharp.RelationalC _1) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.ffi.MR.test_csharp.H5.MR_C_greater_equal_MR_CSharp_RelationalF_MR_CSharp_RelationalC.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java index 56e6972d..49d64e51 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SA.java @@ -18,7 +18,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -40,7 +40,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,7 +65,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,7 +89,8 @@ public mrbind_test.mr.csharp.SA assignFromAnother(mrbind_test.mr.csharp.SA _othe { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java index 552d900e..cc394ebd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SB.java @@ -40,7 +40,8 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H4.MR_CSharp_SB_DefaultConstruct.invokeExact(); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.SB assignFromAnother(mrbind_test.mr.csharp.SB _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SB(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -165,6 +170,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SB_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java index 94bc02ba..aafa9ad3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SC.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.SC assignFromAnother(mrbind_test.mr.csharp.SC _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SC(__ret, false, __owner); } @@ -115,6 +118,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -141,6 +145,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,4 +156,84 @@ public void setS(java.lang.String value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::SA`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA()`. */ + public mrbind_test.mr.csharp.SA upcastToSA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SA.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SA(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SA`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSA(mrbind_test.mr.csharp.SA object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SA.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SB`. The result refers to this object. + * + * Calls `MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB()`. */ + public mrbind_test.mr.csharp.SB upcastToSB() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableUpcastTo_MR_CSharp_SB.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SB(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SB`. Undefined behavior if the object isn't actually a `SC`. The result refers to `object`. + * + * Calls `MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB()`. */ + public static mrbind_test.mr.csharp.SC staticDowncastFromSB(mrbind_test.mr.csharp.SB object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SC_MutableStaticDowncastFrom_MR_CSharp_SB.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SC(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java index f3d453c0..86d197a8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SD.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.SD assignFromAnother(mrbind_test.mr.csharp.SD _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SD_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SD(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java index 6804f728..a7236f82 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SE.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -90,6 +92,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -113,6 +116,7 @@ public mrbind_test.mr.csharp.SE assignFromAnother(mrbind_test.mr.csharp.SE _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SE(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -165,6 +170,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SE_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java index 23e2fca4..71beca44 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/SF.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.csharp.SF assignFromAnother(mrbind_test.mr.csharp.SF _othe try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.SF(__ret, false, __owner); } @@ -115,6 +118,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -141,6 +145,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,4 +156,104 @@ public void setS(java.lang.String value) java.lang.ref.Reference.reachabilityFence(this); } } + + /** Upcasts to the base class `MR::CSharp::SD`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD()`. */ + public mrbind_test.mr.csharp.SD upcastToSD() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SD.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SD(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SD`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Dynamic downcast from the base class `MR::CSharp::SD`. Returns null if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD()`. */ + public static mrbind_test.mr.csharp.SF dynamicDowncastFromSD(mrbind_test.mr.csharp.SD object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableDynamicDowncastFrom_MR_CSharp_SD.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return __ret.address() == 0 ? null : new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } + + /** Upcasts to the base class `MR::CSharp::SE`. The result refers to this object. + * + * Calls `MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE()`. */ + public mrbind_test.mr.csharp.SE upcastToSE() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableUpcastTo_MR_CSharp_SE.invokeExact(rawPointer()); + return new mrbind_test.mr.csharp.SE(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::CSharp::SE`. Undefined behavior if the object isn't actually a `SF`. The result refers to `object`. + * + * Calls `MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE()`. */ + public static mrbind_test.mr.csharp.SF staticDowncastFromSE(mrbind_test.mr.csharp.SE object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_SF_MutableStaticDowncastFrom_MR_CSharp_SE.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.csharp.SF(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java index 636a00c6..f5d03e8b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsA assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java index 4a24ac91..253abbaf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsB assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java index 11b48c00..7f451251 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java index 540e79c6..9c934217 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java index 0add2da7..f3ddc8ec 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsE assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsE(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java index 938e41e1..45f47587 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsF assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsF(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java index 9fbfe7e5..74aa8cfd 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsG assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsG(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java index f00d2f79..bae8e89f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsLhsH.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsLhsH assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsLhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsLhsH(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java index 0fb4e8d5..946f2c50 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedLhs.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.StaticOpsMixedLhs assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedLhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsMixedLhs(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java index 1aa7230a..caa136c8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsMixedRhs.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.StaticOpsMixedRhs assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsMixedRhs_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsMixedRhs(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java index df37f16b..59723c0f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsA.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsA assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsA(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java index a96e7825..ea551ffc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsB.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsB assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsB(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java index ab1ad306..3a75ea52 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_MOVE_AND_DESTROY, java.util.Objects.requireNonNull(_other, "_other").release()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java index e155b6a1..bbd7bae6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsD.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsD_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java index a9a4fce8..6d4cb4de 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsE.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsE assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsE_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsE(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java index b00f0824..19f33761 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsF.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsF assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsF_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsF(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java index d7fd6a81..aa25f431 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsG.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsG assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsG_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsG(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java index 0279feb6..403c3c8a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StaticOpsRhsH.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.csharp.StaticOpsRhsH assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StaticOpsRhsH_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StaticOpsRhsH(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java index bd088d9b..376149c4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvFsPath.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -84,6 +86,7 @@ public mrbind_test.mr.cs.std_filesystem_path convertTo_std_filesystem_path() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_ConvertTo_std_filesystem_path.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public mrbind_test.mr.csharp.StringConvFsPath assignFromAnother(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvFsPath_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvFsPath(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java index 59a73abb..f2cc1155 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvString.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.cs.std_string convertTo_std_string() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_ConvertTo_std_string.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -109,6 +112,7 @@ public mrbind_test.mr.csharp.StringConvString assignFromAnother(mrbind_test.mr.c try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvString_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvString(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java index 3a3ed2f2..c8b66d87 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/StringConvStringView.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.cs.std_string_view convertTo_std_string_view() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_ConvertTo_std_string_view.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.csharp.StringConvStringView assignFromAnother(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_StringConvStringView_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.StringConvStringView(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java index 0d4675cc..3524556c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestConstness.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.TestConstness assignFromAnother(mrbind_test.mr.csha try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestConstness(__ret, false, __owner); } @@ -109,6 +112,7 @@ public void foo_mut() try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -130,6 +134,7 @@ public void foo() try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestConstness_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java index 2664ce9b..df020537 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestFields.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -75,6 +76,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int i, int c java.lang.foreign.MemorySegment __str_const_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s, "const_s")); java.lang.foreign.MemorySegment __str_const_s_ref = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(const_s_ref, "const_s_ref")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_ConstructFrom.invokeExact(i, const_i, i_ref, mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, const_i_ref), __str_s, mrbind_test.Ffi.end(__str_s), __str_const_s, mrbind_test.Ffi.end(__str_const_s), mrbind_test.Ffi.ptrNonNull(s_ref, "s_ref"), __str_const_s_ref, mrbind_test.Ffi.end(__str_const_s_ref)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -97,6 +99,7 @@ public static int static_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -115,6 +118,7 @@ public static void setStatic_i(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_i.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public static int static_const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -150,6 +155,7 @@ public static java.lang.foreign.MemorySegment static_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -168,6 +174,7 @@ public static int static_const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_i_ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -186,6 +193,7 @@ public static mrbind_test.mr.cs.std_string static_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -207,6 +215,7 @@ public static void setStatic_s(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_static_s.invokeExact(__str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -224,6 +233,7 @@ public static mrbind_test.mr.cs.std_string static_const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -243,6 +253,7 @@ public static mrbind_test.mr.cs.std_string static_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -262,6 +273,7 @@ public static mrbind_test.mr.cs.std_string static_const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_static_const_s_ref.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -283,6 +295,7 @@ public int i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -306,6 +319,7 @@ public void setI(int value) try { mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_i.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -328,6 +342,7 @@ public int const_i() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -351,6 +366,7 @@ public java.lang.foreign.MemorySegment i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -374,6 +390,7 @@ public int const_i_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_i_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -397,6 +414,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -422,6 +440,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -444,6 +463,7 @@ public mrbind_test.mr.cs.std_string const_s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -468,6 +488,7 @@ public mrbind_test.mr.cs.std_string s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -492,6 +513,7 @@ public mrbind_test.mr.cs.std_string const_s_ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestFields_Get_const_s_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java index 04b8f363..23d2ceca 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsA.java @@ -15,7 +15,7 @@ private static void __destroy(java.lang.foreign.MemorySegment ptr) { try { - mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); + mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_Destroy.invokeExact(ptr); } catch (java.lang.Throwable e) { @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public int assignFromAnother(mrbind_test.mr.csharp.TestOpsA _other) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public int opAdd() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -107,6 +110,7 @@ public int opAdd(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public int opSub() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -152,6 +157,7 @@ public int opSub(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -175,6 +181,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -197,6 +204,7 @@ public int opMul(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -220,6 +228,7 @@ public int opDiv(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -243,6 +252,7 @@ public int opMod(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -266,6 +276,7 @@ public int opXor(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -289,6 +300,7 @@ public int opBitand() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -311,6 +323,7 @@ public int opBitand(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -334,6 +347,7 @@ public int opBitor(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitor_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -357,6 +371,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compl_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_not_MR_CSharp_TestOpsA.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public int add_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public int sub_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -447,6 +465,7 @@ public int mul_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -470,6 +489,7 @@ public int div_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -493,6 +513,7 @@ public int mod_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -516,6 +537,7 @@ public int xor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -539,6 +561,7 @@ public int bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -561,7 +584,8 @@ public int bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -584,7 +608,8 @@ public int opLshift(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -607,7 +632,8 @@ public int opRshift(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -630,7 +656,8 @@ public int lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -653,7 +680,8 @@ public int rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -676,7 +704,8 @@ public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -699,7 +728,8 @@ public int opAnd(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -722,7 +752,8 @@ public int opOr(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -745,7 +776,8 @@ public int opComma(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -768,7 +800,8 @@ public int arrow_star(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -791,7 +824,8 @@ public int arrow() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -813,7 +847,8 @@ public int call(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -836,7 +871,8 @@ public int index(mrbind_test.mr.csharp.TestOpsA _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsA_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java index 72288f48..60d60d6e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsB.java @@ -38,7 +38,8 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin { try { - java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,7 +62,8 @@ public int assignFromAnother(mrbind_test.mr.csharp.TestOpsB _other) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -84,7 +86,8 @@ public int opAdd() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -106,7 +109,8 @@ public int opAdd(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,7 +133,8 @@ public int opSub() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,7 +156,8 @@ public int opSub(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -174,7 +180,8 @@ public int opMul() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,7 +203,8 @@ public int opMul(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -219,7 +227,8 @@ public int opDiv(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -242,7 +251,8 @@ public int opMod(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -265,7 +275,8 @@ public int opXor(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -288,7 +299,8 @@ public int opBitand() { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,7 +322,8 @@ public int opBitand(mrbind_test.mr.csharp.TestOpsB _1) { try { - int __ret = (int)mrbind_test.ffi.MR.test_csharp.H5.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -334,6 +347,7 @@ public int opBitor(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -357,6 +371,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsB.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public int add_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public int sub_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -447,6 +465,7 @@ public int mul_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -470,6 +489,7 @@ public int div_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -493,6 +513,7 @@ public int mod_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -516,6 +537,7 @@ public int xor_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -539,6 +561,7 @@ public int bitand_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -562,6 +585,7 @@ public int bitor_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -585,6 +609,7 @@ public int opLshift(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -608,6 +633,7 @@ public int opRshift(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -631,6 +657,7 @@ public int lshift_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -654,6 +681,7 @@ public int rshift_assign(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -677,6 +705,7 @@ public int opCompareThreeWay(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -700,6 +729,7 @@ public int opAnd(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -723,6 +753,7 @@ public int opOr(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -746,6 +777,7 @@ public int opComma(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsB.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -769,6 +801,7 @@ public int arrow_star(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -792,6 +825,7 @@ public int arrow() try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -814,6 +848,7 @@ public int call(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_call.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -837,6 +872,7 @@ public int index(mrbind_test.mr.csharp.TestOpsB _1) try { int __ret = (int)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsB_index.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java index 5cc3a9c3..05c366e7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestOpsC.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ public mrbind_test.mr.csharp.TestOpsC assignFromAnother(mrbind_test.mr.csharp.Te try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestOpsC(__ret, false, __owner); } @@ -86,6 +88,7 @@ public void opAdd() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_pos_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public void opAdd(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_add_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -129,6 +133,7 @@ public void opSub() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_neg_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -150,6 +155,7 @@ public void opSub(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_sub_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public void opMul() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_deref_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -193,6 +200,7 @@ public void opMul(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_mul_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -215,6 +223,7 @@ public void opDiv(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_div_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -237,6 +246,7 @@ public void opMod(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_mod_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -259,6 +269,7 @@ public void opXor(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_xor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -281,6 +292,7 @@ public void opBitand() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_addressof_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -302,6 +314,7 @@ public void opBitand(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitand_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -324,6 +337,7 @@ public void opBitor(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_bitor_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -346,6 +360,7 @@ public void opCompl() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_compl_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -367,6 +382,7 @@ public void opNot() try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_not_MR_CSharp_TestOpsC.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -388,6 +404,7 @@ public void assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -410,6 +427,7 @@ public void add_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -432,6 +450,7 @@ public void sub_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +473,7 @@ public void mul_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -476,6 +496,7 @@ public void div_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -498,6 +519,7 @@ public void mod_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -520,6 +542,7 @@ public void xor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -542,6 +565,7 @@ public void bitand_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -564,6 +588,7 @@ public void bitor_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -586,6 +611,7 @@ public void opLshift(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_lshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -608,6 +634,7 @@ public void opRshift(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_rshift_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -630,6 +657,7 @@ public void lshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -652,6 +680,7 @@ public void rshift_assign(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -674,6 +703,7 @@ public void opCompareThreeWay(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_compare_three_way_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -696,6 +726,7 @@ public void opAnd(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_and_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -718,6 +749,7 @@ public void opOr(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_or_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -740,6 +772,7 @@ public void opComma(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_C_comma_MR_CSharp_TestOpsC_MR_CSharp_TestOpsA.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -762,6 +795,7 @@ public void arrow_star(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -784,6 +818,7 @@ public void arrow() try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -805,6 +840,7 @@ public void call(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -827,6 +863,7 @@ public void index(mrbind_test.mr.csharp.TestOpsA _1) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestOpsC_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java index a58339ab..d2fc362c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TestStdFunction.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -69,6 +70,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFrom.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f1, "f1"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f2, "f2"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f3, "f3"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f4, "f4"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f5, "f5"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f6, "f6"), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(f7, "f7")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -103,6 +105,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -126,6 +129,7 @@ public mrbind_test.mr.csharp.TestStdFunction assignFromAnother(mrbind_test.mr.cs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TestStdFunction(__ret, false, __owner); } @@ -150,6 +154,7 @@ public void Call() try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Call.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +177,7 @@ public mrbind_test.mr.cs.std_function_int_from_std_string f1() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f1.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_from_std_string(__ret, false, __owner); } @@ -196,6 +202,7 @@ public void setF1(mrbind_test.mr.cs.std_function_int_from_std_string value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f1.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -219,6 +226,7 @@ public mrbind_test.mr.cs.std_function_std_string_from_int_int f2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_std_string_from_int_int(__ret, false, __owner); } @@ -243,6 +251,7 @@ public void setF2(mrbind_test.mr.cs.std_function_std_string_from_int_int value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f2.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -266,6 +275,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 f3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f3.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1(__ret, false, __owner); } @@ -290,6 +300,7 @@ public void setF3(mrbind_test.mr.cs.std_function_MR_CSharp_E1_from_MR_CSharp_E1 try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f3.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -313,6 +324,7 @@ public mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_Ex try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f4.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_MR_CSharp_ExposedLayoutC(__ret, false, __owner); } @@ -337,6 +349,7 @@ public void setF4(mrbind_test.mr.cs.std_function_MR_CSharp_ExposedLayoutC_from_M try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f4.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -360,6 +373,7 @@ public mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref f5() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f5.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue_ref(__ret, false, __owner); } @@ -384,6 +398,7 @@ public void setF5(mrbind_test.mr.cs.std_function_int_ref_from_int_ref_int_rvalue try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f5.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -407,6 +422,7 @@ public mrbind_test.mr.cs.std_function_int_rvalue_ref f6() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f6.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_int_rvalue_ref(__ret, false, __owner); } @@ -431,6 +447,7 @@ public void setF6(mrbind_test.mr.cs.std_function_int_rvalue_ref value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f6.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -454,6 +471,7 @@ public mrbind_test.mr.cs.std_function_void f7() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Get_f7.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_function_void(__ret, false, __owner); } @@ -478,6 +496,7 @@ public void setF7(mrbind_test.mr.cs.std_function_void value) try { mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TestStdFunction_Set_f7.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java index 4d8aa3b6..ea9816a3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/Trivial.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.Trivial assignFromAnother(mrbind_test.mr.csharp.Tri try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_Trivial_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.Trivial(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java index 15667fd0..1c79ab13 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/csharp/TrivialDerived.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.csharp.TrivialDerived assignFromAnother(mrbind_test.mr.csh try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_csharp.H6.MR_CSharp_TrivialDerived_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.csharp.TrivialDerived(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java index af4d7b2a..e4e6f70c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Af.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.customprefnames.Af assignFromAnother(mrbind_test.mr.custom try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Af_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.customprefnames.Af(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java index b278ab52..91936354 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Ai.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.customprefnames.Ai assignFromAnother(mrbind_test.mr.custom try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_Ai_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.customprefnames.Ai(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java index 51b63a01..441125ac 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/customprefnames/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.customprefnames; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_custom_preferred_names.H0.MR_CustomPrefNames_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java index 590b87e3..d00a457b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A.java @@ -36,6 +36,7 @@ public mrbind_test.mr.declorder.A_B c() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_c.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.A_B(__ret, null); } catch (java.lang.Throwable __e) @@ -58,6 +59,7 @@ public mrbind_test.mr.declorder.A_E d() try { int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_d.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.declorder.A_E.of(__ret); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java index aedf4a22..b2de2931 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/A_B.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_a.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.A(__ret, null); } catch (java.lang.Throwable __e) @@ -57,6 +58,7 @@ public mrbind_test.mr.declorder.A_E b() try { int __ret = (int)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_A_B_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.declorder.A_E.of(__ret); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java index 332fe584..be0112cc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_false.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.C_true blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_false_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.C_true(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java index 32f17bea..fdc25e1a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/declorder/C_true.java @@ -35,6 +35,7 @@ public mrbind_test.mr.declorder.C_false blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_declaration_order.H0.MR_DeclOrder_C_true_blah.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto(), rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.declorder.C_false(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java index a3e23774..c5841177 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/deprecation/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.deprecation; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void foo() try { mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_foo.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void bar() try { mrbind_test.ffi.MR.test_deprecation.H0.MR_Deprecation_bar.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java index 5c898331..98f62931 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/A_MR_IncludesForEnumConstants_E_e1.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants_2.H0.MR_IncludesForEnumConstants_A_MR_IncludesForEnumConstants_E_e1_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java index c06e887e..22998e45 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/includesforenumconstants/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.includesforenumconstants; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConsta try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_includes_for_enum_constants.H0.MR_IncludesForEnumConstants_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.includesforenumconstants.A_MR_IncludesForEnumConstants_E_e1(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java index 64159806..df7dfe44 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/incompletearrayelemtype/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.incompletearrayelemtype; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void bar(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_arrays_of_incomplete_types_2.H0.MR_IncompleteArrayElemType_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void foo(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_arrays_of_incomplete_types.H0.MR_IncompleteArrayElemType_foo.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java index f2202f59..b9a9e4d7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.iostream.A assignFromAnother(mrbind_test.mr.iostream.A _ot try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_iostream.H0.MR_IOStream_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.iostream.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java index 5e65e057..c9f2e647 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/iostream/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.iostream; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void opLshift(mrbind_test.mr.cs.std_ostream _1, mrbind_test.mr.ios try { mrbind_test.ffi.MR.test_iostream.H0.MR_C_print_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -38,6 +39,7 @@ public static void opRshift(mrbind_test.mr.cs.std_istream _1, mrbind_test.mr.ios try { mrbind_test.ffi.MR.test_iostream.H0.MR_C_input_MR_IOStream_A.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java index d497c81e..c86649bf 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.lifetimeinference.A assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.A(__ret, false, __owner); } @@ -132,6 +136,7 @@ public java.lang.foreign.MemorySegment begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -154,6 +159,7 @@ public java.lang.foreign.MemorySegment end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -199,6 +206,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java index 3ebd2015..0af5d130 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.lifetimeinference.B assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.B(__ret, false, __owner); } @@ -133,6 +137,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_B_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java index bc33fc14..8607e848 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -66,6 +67,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(mrbind_test.mr.l try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_Construct.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), _2, _3); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public mrbind_test.mr.lifetimeinference.C assignFromAnother(mrbind_test.mr.lifet try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.lifetimeinference.C(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java index f0976074..182cbff4 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/lifetimeinference/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.lifetimeinference; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinfer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -38,6 +39,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinferen try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_A.invokeExact(mrbind_test.Ffi.ptrNonNull(a, "a")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -60,6 +62,7 @@ public static java.lang.foreign.MemorySegment begin(mrbind_test.mr.lifetimeinfer try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_begin_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -82,6 +85,7 @@ public static java.lang.foreign.MemorySegment end(mrbind_test.mr.lifetimeinferen try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_lifetime_inference.H0.MR_LifetimeInference_end_MR_LifetimeInference_B.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java index de140376..e96df36f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/A.java @@ -65,6 +65,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -84,6 +85,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java index 984fe8fe..80f56061 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/B.java @@ -48,6 +48,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_B_DefaultConstruct.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java index 2f538576..c23bb2ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/matchinglayout/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.matchinglayout; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.matchinglayout.B foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_foo.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.matchinglayout.B(__ret, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.matchinglayout.B _1) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void baz(mrbind_test.mr.matchinglayout.B _1) try { mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_baz.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.matchinglayout.B bleh(mrbind_test.mr.matchinglayout try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_matching_layout.H0.MR_MatchingLayout_bleh.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = _1; return __ret.address() == 0 ? null : new mrbind_test.mr.matchinglayout.B(__ret.reinterpret(mrbind_test.mr.matchinglayout.B.LAYOUT.byteSize()), __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java index 1036f3e3..8cf13345 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/membervars/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ public static int z() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_z.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -79,6 +81,7 @@ public static void setZ(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_z.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -96,6 +99,7 @@ public static int w() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_w.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -115,6 +119,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -137,6 +142,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -159,6 +165,7 @@ public int y() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_y.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -183,6 +190,7 @@ public java.lang.foreign.MemorySegment ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +215,7 @@ public int arr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_Get_arr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -229,6 +238,7 @@ public static long arrSize() try { long __ret = (long)mrbind_test.ffi.MR.test_member_vars.H0.MR_MemberVars_A_GetSize_arr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java index 93722de0..701c37e6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.nestedtemplateinst.A_int assignFromAnother(mrbind_test.mr. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtemplateinst.A_int(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java index 2afd2821..b50cec21 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtemplateinst/A_int_AA_float.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.nestedtemplateinst.A_int_AA_float assignFromAnother(mrbind try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_class_template_inst.H0.MR_NestedTemplateInst_A_int_AA_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtemplateinst.A_int_AA_float(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java index ed188cce..51db6dd5 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFrom.invokeExact(mrbind_test.Ffi.ptrNonNull(b, "b"), java.util.Objects.requireNonNull(e, "e").value); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -91,6 +93,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -114,6 +117,7 @@ public mrbind_test.mr.nestedtypes.A assignFromAnother(mrbind_test.mr.nestedtypes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A(__ret, false, __owner); } @@ -139,6 +143,7 @@ public mrbind_test.mr.nestedtypes.A_B b() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_b.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); } @@ -163,6 +168,7 @@ public void setB(mrbind_test.mr.nestedtypes.A_B value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_b.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +192,7 @@ public mrbind_test.mr.nestedtypes.A_E e() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Get_e.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return mrbind_test.mr.nestedtypes.A_E.of(__ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0)); } catch (java.lang.Throwable __e) @@ -209,6 +216,7 @@ public void setE(mrbind_test.mr.nestedtypes.A_E value) try { mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_Set_e.invokeExact(rawPointer(), java.util.Objects.requireNonNull(value, "value").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java index 0daf7010..4253b30d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/nestedtypes/A_B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.nestedtypes.A_B assignFromAnother(mrbind_test.mr.nestedtyp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_nested_types.H0.MR_NestedTypes_A_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.nestedtypes.A_B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java index 0e2c9e45..83f8e16d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_float.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.omittingtargsandquals.A_float assignFromAnother(mrbind_tes try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.omittingtargsandquals.A_float(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void opAdd() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java index e592d5df..dcd5cf64 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/A_int.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.omittingtargsandquals.A_int assignFromAnother(mrbind_test. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.omittingtargsandquals.A_int(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void opAdd() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_pos_MR_OmittingTargsAndQuals_A_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void opSub(mrbind_test.mr.omittingtargsandquals.A_float _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_sub_MR_OmittingTargsAndQuals_A_int_MR_OmittingTargsAndQuals_A_float.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java index d41b8b18..d206956d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/omittingtargsandquals/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.omittingtargsandquals; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void a(mrbind_test.mr.omittingtargsandquals.A_int _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void b(mrbind_test.mr.omittingtargsandquals.A_int _1, mrbind_test. try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_b.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -59,6 +61,7 @@ public static void a(mrbind_test.mr.omittingtargsandquals.A_float _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_a_MR_OmittingTargsAndQuals_A_float.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -80,6 +83,7 @@ public static void opMul(mrbind_test.mr.omittingtargsandquals.A_int _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_deref_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +105,7 @@ public static void opCompl(mrbind_test.mr.omittingtargsandquals.A_int _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_C_compl_MR_OmittingTargsAndQuals_A_int.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -122,6 +127,7 @@ public static void c(mrbind_test.mr.omittingtargsandquals.A_int _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_c.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -143,6 +149,7 @@ public static void d(mrbind_test.mr.omittingtargsandquals.A_int _1) try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_d.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -164,6 +171,7 @@ public static void inst() try { mrbind_test.ffi.MR.test_omitting_template_args_and_quals.H0.MR_OmittingTargsAndQuals_inst.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java index 5ca2cb80..abcdba9a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/A.java @@ -41,6 +41,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -65,6 +66,7 @@ public int assignFromAnother(mrbind_test.mr.overloadedops.A _other) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -89,6 +91,7 @@ public int opAdd() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -112,6 +115,7 @@ public int opAdd(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -136,6 +140,7 @@ public int opSub() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -159,6 +164,7 @@ public int opSub(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -183,6 +189,7 @@ public int opMul() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -206,6 +213,7 @@ public int opMul(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -230,6 +238,7 @@ public int opDiv(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -254,6 +263,7 @@ public int opMod(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -278,6 +288,7 @@ public int opXor(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -302,6 +313,7 @@ public int opBitand(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +338,7 @@ public int opBitor(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -350,6 +363,7 @@ public int opCompl() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -373,6 +387,7 @@ public int opNot() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -396,6 +411,7 @@ public int opLess(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -420,6 +436,7 @@ public int opGreater(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -444,6 +461,7 @@ public int add_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_add_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -468,6 +486,7 @@ public int sub_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_sub_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -492,6 +511,7 @@ public int mul_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mul_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -516,6 +536,7 @@ public int div_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_div_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -540,6 +561,7 @@ public int mod_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_mod_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -564,6 +586,7 @@ public int xor_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_xor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -588,6 +611,7 @@ public int bitand_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitand_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -612,6 +636,7 @@ public int bitor_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_bitor_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -636,6 +661,7 @@ public int opLshift(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -660,6 +686,7 @@ public int opRshift(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -684,6 +711,7 @@ public int lshift_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_lshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -708,6 +736,7 @@ public int rshift_assign(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_rshift_assign.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -732,6 +761,7 @@ public int opEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -756,6 +786,7 @@ public int opNotEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -780,6 +811,7 @@ public int opLessEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -804,6 +836,7 @@ public int opGreaterEqual(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -828,6 +861,7 @@ public int opCompareThreeWay(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -852,6 +886,7 @@ public int opAnd(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -876,6 +911,7 @@ public int opOr(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -900,6 +936,7 @@ public int opIncr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -923,6 +960,7 @@ public int opPostIncr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -946,6 +984,7 @@ public int opDecr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -969,6 +1008,7 @@ public int opPostDecr() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_A.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -992,6 +1032,7 @@ public int opComma(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_A.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1016,6 +1057,7 @@ public int arrow_star(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow_star.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1040,6 +1082,7 @@ public int arrow() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_arrow.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1063,6 +1106,7 @@ public int call(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_call.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1087,6 +1131,7 @@ public int index(mrbind_test.mr.overloadedops.A _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_A_index.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java index 9bc5b847..1561199c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/B.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.overloadedops.B assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.B(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java index ef8a98ab..8aa8c8e3 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/C.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.overloadedops.C assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_C_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.C(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java index f03dcf60..f887d23c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/D.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.overloadedops.D assignFromAnother(mrbind_test.mr.overloade try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_OverloadedOps_D_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.overloadedops.D(__ret, false, __owner); } @@ -110,6 +113,7 @@ public int opDeref_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -132,6 +136,7 @@ public int opDeref_const_ref() try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_const_MR_OverloadedOps_D_ref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java index 2cdd3df4..4b146425 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloadedops/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloadedops; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static int opAdd(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -40,6 +41,7 @@ public static int opAdd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +66,7 @@ public static int opSub(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_neg_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +90,7 @@ public static int opSub(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +115,7 @@ public static int opMul(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_deref_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -134,6 +139,7 @@ public static int opMul(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -158,6 +164,7 @@ public static int opDiv(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -182,6 +189,7 @@ public static int opMod(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -206,6 +214,7 @@ public static int opXor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -230,6 +239,7 @@ public static int opBitand(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -254,6 +264,7 @@ public static int opBitor(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -278,6 +289,7 @@ public static int opCompl(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compl_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -301,6 +313,7 @@ public static int opNot(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -326,6 +339,7 @@ public static int opLess(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overl try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -350,6 +364,7 @@ public static int opGreater(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ov try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -374,6 +389,7 @@ public static int opAddAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -398,6 +414,7 @@ public static int opSubAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_sub_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -422,6 +439,7 @@ public static int opMulAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mul_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -446,6 +464,7 @@ public static int opDivAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_div_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -470,6 +489,7 @@ public static int opModAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_mod_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -494,6 +514,7 @@ public static int opXorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_xor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -518,6 +539,7 @@ public static int opBitandAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitand_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -542,6 +564,7 @@ public static int opBitorAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test.m try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_bitor_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -566,6 +589,7 @@ public static int opLshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -590,6 +614,7 @@ public static int opRshift(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.ove try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -614,6 +639,7 @@ public static int opLshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_lshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -638,6 +664,7 @@ public static int opRshiftAssign(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_rshift_assign_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -662,6 +689,7 @@ public static int opEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -686,6 +714,7 @@ public static int opNotEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.o try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_not_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -710,6 +739,7 @@ public static int opLessEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_less_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -734,6 +764,7 @@ public static int opGreaterEqual(mrbind_test.mr.overloadedops.B _1, mrbind_test. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_greater_equal_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -758,6 +789,7 @@ public static int opCompareThreeWay(mrbind_test.mr.overloadedops.B _1, mrbind_te try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_compare_three_way_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -782,6 +814,7 @@ public static int opAnd(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overlo try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_and_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -806,6 +839,7 @@ public static int opOr(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.overloa try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_or_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -830,6 +864,7 @@ public static int opIncr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -853,6 +888,7 @@ public static int opPostIncr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_incr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -876,6 +912,7 @@ public static int opDecr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -899,6 +936,7 @@ public static int opPostDecr(mrbind_test.mr.overloadedops.B _1) try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_post_decr_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -922,6 +960,7 @@ public static int opComma(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr.over try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_comma_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -946,6 +985,7 @@ public static int opArrowStar(mrbind_test.mr.overloadedops.B _1, mrbind_test.mr. try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_arrow_star_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -970,6 +1010,7 @@ public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overl try { mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -993,6 +1034,7 @@ public static void opAdd(mrbind_test.mr.overloadedops.C _1, mrbind_test.mr.overl try { mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_add_MR_OverloadedOps_C_MR_OverloadedOps_B.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1"), mrbind_test.Ffi.ptrNonNull(_2, "_2")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -1015,6 +1057,7 @@ public static int opPos_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedops.D _1 try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -1037,6 +1080,7 @@ public static int opPos_const_MR_OverloadedOps_D_ref(mrbind_test.mr.overloadedop try { int __ret = (int)mrbind_test.ffi.MR.test_overloaded_operators.H0.MR_C_pos_const_MR_OverloadedOps_D_ref.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java index e279ebda..bca7a875 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/overloads/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.overloads; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void a(int _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_1.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void a(int _1, int _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_a_2.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -50,6 +52,7 @@ public static void b_int() try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_int.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -67,6 +70,7 @@ public static void b_float() try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_b_float.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -84,6 +88,7 @@ public static void c(int _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -101,6 +106,7 @@ public static void c(float _1) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_c_float.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +124,7 @@ public static void d(byte _1, int _2, byte _3) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_int.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -135,6 +142,7 @@ public static void d(byte _1, float _2, byte _3) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_d_float.invokeExact(_1, _2, _3); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -152,6 +160,7 @@ public static void e(int _1, java.lang.foreign.MemorySegment _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -169,6 +178,7 @@ public static void e_int_rvalue_ref_int(java.lang.foreign.MemorySegment _1, java try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_int.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -186,6 +196,7 @@ public static void e_int_rvalue_ref_float(java.lang.foreign.MemorySegment _1, ja try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_e_int_rvalue_ref_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -206,6 +217,7 @@ public static void f(float _1, int _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_float.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -223,6 +235,7 @@ public static void f(java.lang.foreign.MemorySegment _1, float _2) try { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_int_rvalue_ref.invokeExact(_1, _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -240,6 +253,7 @@ public static void f(int _1, float _2) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_overloads.H0.MR_Overloads_f_const_int_ref.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1), _2); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java index 335308d0..140351a0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/phmap/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.phmap; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.phmap.phmap_flat_hash_set_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void foo(mrbind_test.phmap.phmap_flat_hash_map_int_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static void foo(mrbind_test.phmap.phmap_node_hash_set_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -79,6 +82,7 @@ public static void foo(mrbind_test.phmap.phmap_node_hash_map_int_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -100,6 +104,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_set_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -121,6 +126,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_flat_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -142,6 +148,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_set_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +170,7 @@ public static void foo(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_parallel_node_hash_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -184,6 +192,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_set_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_set_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -205,6 +214,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_map_int_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_map_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -226,6 +236,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_multiset_int _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multiset_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +258,7 @@ public static void foo(mrbind_test.phmap.phmap_btree_multimap_int_float _1) try { mrbind_test.ffi.MR.test_phmap.H0.MR_Phmap_foo_phmap_btree_multimap_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java index 56cc1825..9e86234c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.signaturefilters.A assignFromAnother(mrbind_test.mr.signat try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java index eed467cb..14d92f69 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Blah.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.signaturefilters.Blah assignFromAnother(mrbind_test.mr.sig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.Blah(__ret, false, __owner); } @@ -110,6 +113,7 @@ public mrbind_test.mr.signaturefilters.A a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -134,6 +138,7 @@ public void setA(mrbind_test.mr.signaturefilters.A value) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_Blah_Set_a.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(value, "value")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java index 885d08b0..35b84c99 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/signaturefilters/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.signaturefilters; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static mrbind_test.mr.signaturefilters.A foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.signaturefilters.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -55,6 +57,7 @@ public static void foo2(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.signaturefilters.A foo2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo2_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -95,6 +99,7 @@ public static void foo3(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -116,6 +121,7 @@ public static mrbind_test.mr.signaturefilters.A foo3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo3_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -135,6 +141,7 @@ public static void foo4(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +163,7 @@ public static mrbind_test.mr.signaturefilters.A foo4() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo4_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } @@ -175,6 +183,7 @@ public static void foo5(mrbind_test.mr.signaturefilters.A _1) try { mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_1.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -196,6 +205,7 @@ public static mrbind_test.mr.signaturefilters.A foo5() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_mention_blacklists.H0.MR_SignatureFilters_foo5_0.invokeExact(); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = null; return new mrbind_test.mr.signaturefilters.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java index 67e6297b..dcb3a824 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/staticfuncs/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.staticfuncs.A assignFromAnother(mrbind_test.mr.staticfuncs try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.staticfuncs.A(__ret, false, __owner); } @@ -109,6 +112,7 @@ public static void blah() try { mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_blah.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -126,6 +130,7 @@ public static int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Get_x.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -144,6 +149,7 @@ public static void setX(int value) try { mrbind_test.ffi.MR.test_static_memberr.H0.MR_StaticFuncs_A_Set_x.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java index 3f7589f4..21eb8fd7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdcontainers.A assignFromAnother(mrbind_test.mr.stdcontai try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java index bc862092..79818ac9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdcontainers; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void Set(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Set.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void SetWithDefault(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_SetWithDefault.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static mrbind_test.mr.cs.std_vector_int Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -76,6 +79,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static void ConstRef(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -139,6 +145,7 @@ public static void RvalueRef(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_RvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +167,7 @@ public static void ConstRvalueRef(mrbind_test.mr.cs.std_vector_int _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_ConstRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -182,6 +190,7 @@ public static mrbind_test.mr.cs.std_deque_int GetDeque() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDeque.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -200,6 +209,7 @@ public static mrbind_test.mr.cs.std_list_int GetList() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetList.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +228,7 @@ public static mrbind_test.mr.cs.std_set_int GetSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -236,6 +247,7 @@ public static mrbind_test.mr.cs.std_multiset_int GetMultiSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -254,6 +266,7 @@ public static mrbind_test.mr.cs.std_unordered_set_int GetUnorderedSet() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -272,6 +285,7 @@ public static mrbind_test.mr.cs.std_unordered_multiset_int GetUnorderedMultiSet( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSet.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -290,6 +304,7 @@ public static mrbind_test.mr.cs.std_map_int_float GetMap() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -308,6 +323,7 @@ public static mrbind_test.mr.cs.std_multimap_int_float GetMultiMap() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -326,6 +342,7 @@ public static mrbind_test.mr.cs.std_unordered_map_int_float GetUnorderedMap() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -344,6 +361,7 @@ public static mrbind_test.mr.cs.std_unordered_multimap_int_float GetUnorderedMul try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMap.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -362,6 +380,7 @@ public static mrbind_test.mr.cs.std_array_MR_StdContainers_A_42 GetStdArray() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArray.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_MR_StdContainers_A_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -380,6 +399,7 @@ public static mrbind_test.mr.cs.std_array_int_43 GetStdArraySimple() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArraySimple.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_int_43(__ret, null); } catch (java.lang.Throwable __e) @@ -399,6 +419,7 @@ public static void StdArraySimpleParam(mrbind_test.mr.cs.std_array_int_43 _1) try { mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimpleParam.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -420,6 +441,7 @@ public static mrbind_test.mr.cs.std_array_int_43 StdArraySimplePtr(mrbind_test.m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_StdArraySimplePtr.invokeExact(mrbind_test.Ffi.ptr(param)); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = param; return __ret.address() == 0 ? null : new mrbind_test.mr.cs.std_array_int_43(__ret.reinterpret(mrbind_test.mr.cs.std_array_int_43.LAYOUT.byteSize()), __owner); } @@ -444,6 +466,7 @@ public static mrbind_test.mr.cs.std_multiset_float GetMultiSetWithMergedIters() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetWithMergedIters.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -462,6 +485,7 @@ public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIter() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIter.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -480,6 +504,7 @@ public static mrbind_test.mr.cs.std_set_float_const_iterator GetMergedIterConst( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMergedIterConst.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -498,6 +523,7 @@ public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructi try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefCon.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonDefaultConstructible(__ret, true, null); } catch (java.lang.Throwable __e) @@ -516,6 +542,7 @@ public static mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable GetVec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetVectorNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -534,6 +561,7 @@ public static mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable GetDequ try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetDequeNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_deque_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -552,6 +580,7 @@ public static mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable GetListN try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetListNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_list_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -570,6 +599,7 @@ public static mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable GetSetNA( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_set_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -588,6 +618,7 @@ public static mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable GetM try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multiset_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -606,6 +637,7 @@ public static mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_set_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -624,6 +656,7 @@ public static mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiSetNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multiset_MR_StdContainers_NonAssignable(__ret, true, null); } catch (java.lang.Throwable __e) @@ -642,6 +675,7 @@ public static mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float Get try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_map_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -660,6 +694,7 @@ public static mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_floa try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -678,6 +713,7 @@ public static mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_map_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -696,6 +732,7 @@ public static mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssig try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetUnorderedMultiMapNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_unordered_multimap_MR_StdContainers_NonAssignable_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -714,6 +751,7 @@ public static mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42 GetS try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayNA.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_MR_StdContainers_NonAssignable_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -734,6 +772,7 @@ public static mrbind_test.mr.cs.std_array_int_array_4_array_3_5 GetStdArrayOfPla try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_GetStdArrayOfPlainArray.invokeExact((java.lang.foreign.SegmentAllocator)java.lang.foreign.Arena.ofAuto()); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_array_int_array_4_array_3_5(__ret, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java index 4a0a4140..97014ce9 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonAssignable.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonAssignable_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public boolean opLess(mrbind_test.mr.stdcontainers.NonAssignable _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_less_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public boolean opEqual(mrbind_test.mr.stdcontainers.NonAssignable _1) try { boolean __ret = (boolean)mrbind_test.ffi.MR.test_std_containers.H0.MR_C_equal_MR_StdContainers_NonAssignable.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java index b3efb8e0..7ebb4887 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdcontainers/NonDefaultConstructible.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -67,6 +68,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdcontainers.NonDefaultConstructible assignFromAnother(mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_containers.H0.MR_StdContainers_NonDefaultConstructible_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdcontainers.NonDefaultConstructible(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java index 5fe26d7c..eb465f1d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdexpected/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdexpected; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_expected_int_std_string GetExp() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExp.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_int_std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetExp(mrbind_test.mr.cs.std_expected_int_std_string _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExp.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void SetExpConstRef(mrbind_test.mr.cs.std_expected_int_std_string try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static void SetExpDefTrivial(mrbind_test.mr.cs.std_expected_int_std_strin try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void SetExpDef(mrbind_test.mr.cs.std_expected_int_std_string _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static mrbind_test.mr.cs.std_expected_void_float GetExpVoid() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVoid.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_expected_void_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -136,6 +142,7 @@ public static void SetExpVoid(mrbind_test.mr.cs.std_expected_void_float _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoid.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -157,6 +164,7 @@ public static void SetExpVoidConstRef(mrbind_test.mr.cs.std_expected_void_float try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +186,7 @@ public static void SetExpVoidDefTrivial(mrbind_test.mr.cs.std_expected_void_floa try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDefTrivial.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -199,6 +208,7 @@ public static void SetExpVoidDef(mrbind_test.mr.cs.std_expected_void_float _1) try { mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_SetExpVoidDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -220,6 +230,7 @@ public static mrbind_test.mr.cs.std_vector_std_expected_int_std_string GetExpVec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_expected.H0.MR_StdExpected_GetExpVec.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_std_expected_int_std_string(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java index 96057460..b6f01f2a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfilesystem/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfilesystem; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_filesystem_path GetPath() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_GetPath.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_filesystem_path(__ret, true, null); } catch (java.lang.Throwable __e) @@ -35,6 +36,7 @@ public static void SetPath(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPath.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -53,6 +55,7 @@ public static void SetPathConstRef(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(_1, "_1")); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathConstRef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -71,6 +74,7 @@ public static void SetPathDefTrivial(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDefTrivial.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -89,6 +93,7 @@ public static void SetPathDef(java.lang.String _1) { java.lang.foreign.MemorySegment __str__1 = mrbind_test.Ffi.utf8(__arena, _1); mrbind_test.ffi.MR.test_std_filesystem.H0.MR_StdFilesystem_SetPathDef.invokeExact(__str__1, mrbind_test.Ffi.end(__str__1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java index 12efd32a..e4c0462f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_a = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(a, "a")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFrom.invokeExact(__str_a, mrbind_test.Ffi.end(__str_a)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.stdfunction.A assignFromAnother(mrbind_test.mr.stdfunction try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdfunction.A(__ret, false, __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_string a() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Get_a.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -160,6 +165,7 @@ public void setA(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_A_Set_a.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java index a0383c03..29a235ca 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdfunction/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdfunction; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo(mrbind_test.mr.cs.std_function_int _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_int_int _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -58,6 +60,7 @@ public static void foo(mrbind_test.mr.cs.std_function_int_from_int_int _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_int_func_from_int_int.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -79,6 +82,7 @@ public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_E_from_int_ try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_E_func_from_int_MR_StdFunction_E.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -100,6 +104,7 @@ public static void foo(mrbind_test.mr.cs.std_function_std_string_from_int_float try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_std_string_func_from_int_float.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -121,6 +126,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_std_string _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_std_string.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -142,6 +148,7 @@ public static void foo(mrbind_test.mr.cs.std_function_void_from_MR_StdFunction_A try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_void_func_from_MR_StdFunction_A.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -163,6 +170,7 @@ public static void foo(mrbind_test.mr.cs.std_function_MR_StdFunction_A _1) try { mrbind_test.ffi.MR.test_std_function.H0.MR_StdFunction_foo_std_function_MR_StdFunction_A_func.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java index 20580fc2..963d89f2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/A.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -61,6 +62,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(int x) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFrom.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -108,6 +111,7 @@ public mrbind_test.mr.stdoptional.A assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.A(__ret, false, __owner); } @@ -133,6 +137,7 @@ public int x() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Get_x.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public void setX(int value) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_A_Set_x.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java index 290a2da7..9484afc6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/B.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFrom(java.lang.St { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFrom.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +113,7 @@ public mrbind_test.mr.stdoptional.B assignFromAnother(mrbind_test.mr.stdoptional try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdoptional.B(__ret, false, __owner); } @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_string s() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Get_s.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_string(__ret, false, __owner); } @@ -160,6 +165,7 @@ public void setS(java.lang.String value) { java.lang.foreign.MemorySegment __str_value = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(value, "value")); mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_B_Set_s.invokeExact(rawPointer(), __str_value, mrbind_test.Ffi.end(__str_value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java index 247a7ae7..7d0332e7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdoptional/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdoptional; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_optional_int GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetInt.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntConstRef(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -68,6 +71,7 @@ public static void SetIntDefTrivial(int _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -85,6 +89,7 @@ public static void SetIntDef(mrbind_test.mr.cs.std_optional_int _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetIntDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -106,6 +111,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_E GetEnum() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_E(__ret, true, null); } catch (java.lang.Throwable __e) @@ -124,6 +130,7 @@ public static void SetEnum(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnum.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -141,6 +148,7 @@ public static void SetEnumConstRef(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumConstRef.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -158,6 +166,7 @@ public static void SetEnumDefTrivial(mrbind_test.mr.stdoptional.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDefTrivial.invokeExact(mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, java.util.Objects.requireNonNull(_1, "_1").value)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -175,6 +184,7 @@ public static void SetEnumDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_E _1 try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetEnumDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -196,6 +206,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -214,6 +225,7 @@ public static void SetClass(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -235,6 +247,7 @@ public static void SetClassConstRef(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -256,6 +269,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.stdoptional.A _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDefTrivial.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -277,6 +291,7 @@ public static void SetClassDef(mrbind_test.mr.cs.std_optional_MR_StdOptional_A _ try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClassDef.invokeExact(mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -298,6 +313,7 @@ public static mrbind_test.mr.cs.std_optional_MR_StdOptional_B GetClass2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_GetClass2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_optional_MR_StdOptional_B(__ret, true, null); } catch (java.lang.Throwable __e) @@ -316,6 +332,7 @@ public static void SetClass2(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -337,6 +354,7 @@ public static void SetClass2ConstRef(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2ConstRef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -358,6 +376,7 @@ public static void SetClass2DefTrivial(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -379,6 +398,7 @@ public static void SetClass2Def(mrbind_test.mr.stdoptional.B _1) try { mrbind_test.ffi.MR.test_std_optional.H0.MR_StdOptional_SetClass2Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_NO_OBJECT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java index 28b7fcc2..42f38dc8 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stdsharedptr.A assignFromAnother(mrbind_test.mr.stdsharedp try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stdsharedptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java index c20298a2..c6fccd3b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdsharedptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdsharedptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetInt.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void SetIntConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static void SetIntDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -97,6 +101,7 @@ public static void SetIntDef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -118,6 +123,7 @@ public static void SetIntLvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -139,6 +145,7 @@ public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -160,6 +167,7 @@ public static void SetIntRvalueRef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -181,6 +189,7 @@ public static void SetIntRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_int _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -202,6 +211,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array GetIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -220,6 +230,7 @@ public static void SetIntArr(mrbind_test.mr.cs.std_shared_ptr_int_array _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -241,6 +252,7 @@ public static void SetIntArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_arra try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -262,6 +274,7 @@ public static void SetIntArrDef(mrbind_test.mr.cs.std_shared_ptr_int_array _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +296,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_int_array_42 GetIntArr42() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_int_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -301,6 +315,7 @@ public static void SetIntArr42(mrbind_test.mr.cs.std_shared_ptr_int_array_42 _1) try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -322,6 +337,7 @@ public static void SetIntArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_int_ar try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -343,6 +359,7 @@ public static void SetIntArr42Def(mrbind_test.mr.cs.std_shared_ptr_int_array_42 try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetIntArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -364,6 +381,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -382,6 +400,7 @@ public static void SetClass(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A _ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClass.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -403,6 +422,7 @@ public static void SetClassConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShare try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -424,6 +444,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_StdSha try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -445,6 +466,7 @@ public static void SetClassDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -466,6 +488,7 @@ public static void SetClassLvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShar try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -487,6 +510,7 @@ public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_St try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -508,6 +532,7 @@ public static void SetClassRvalueRef(mrbind_test.mr.cs.std_shared_ptr_MR_StdShar try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -529,6 +554,7 @@ public static void SetClassRvalueConstRef(mrbind_test.mr.cs.std_shared_ptr_MR_St try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassRvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -550,6 +576,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array GetClassA try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -568,6 +595,7 @@ public static void SetClassArr(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_ try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -589,6 +617,7 @@ public static void SetClassArrDefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_Std try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -610,6 +639,7 @@ public static void SetClassArrDef(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedP try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArrDef.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -631,6 +661,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42 GetCla try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -649,6 +680,7 @@ public static void SetClassArr42(mrbind_test.mr.cs.std_shared_ptr_MR_StdSharedPt try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -670,6 +702,7 @@ public static void SetClassArr42DefTrivial(mrbind_test.mr.cs.std_shared_ptr_MR_S try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42DefTrivial.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -691,6 +724,7 @@ public static void SetClassArr42Def(mrbind_test.mr.cs.std_shared_ptr_MR_StdShare try { mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_SetClassArr42Def.invokeExact((int)(_1 == null ? mrbind_test.Ffi.PASS_BY_DEFAULT_ARGUMENT : mrbind_test.Ffi.PASS_BY_COPY), mrbind_test.Ffi.ptr(_1)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -714,6 +748,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int GetConstInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int(__ret, true, null); } catch (java.lang.Throwable __e) @@ -732,6 +767,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int_array GetConstIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -750,6 +786,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_int_array_42 GetConstIntArr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstIntArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_int_array_42(__ret, true, null); } catch (java.lang.Throwable __e) @@ -768,6 +805,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A GetConstC try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -786,6 +824,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array Get try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array(__ret, true, null); } catch (java.lang.Throwable __e) @@ -804,6 +843,7 @@ public static mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_shared_ptr.H0.MR_StdSharedPtr_GetConstClassArr42.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_shared_ptr_const_MR_StdSharedPtr_A_array_42(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java index d0049795..f58ee771 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstring/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstring; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void Set(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void SetWithDefault(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_string Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string(__ret, true, null); } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_string ref) try { mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +95,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_string ptr) try { mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +118,7 @@ public static void ConstRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +137,7 @@ public static void RvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -149,6 +156,7 @@ public static void ConstRvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string.H0.MR_StdString_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java index 5a809a36..771bdf30 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdstringview/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdstringview; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -17,6 +17,7 @@ public static void Set(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Set.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -35,6 +36,7 @@ public static void SetWithDefault(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, s); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_SetWithDefault.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_string_view Get() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_Get.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_string_view(__ret, true, null); } catch (java.lang.Throwable __e) @@ -70,6 +73,7 @@ public static void WriteToRef(mrbind_test.mr.cs.std_string_view ref) try { mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToRef.invokeExact(mrbind_test.Ffi.ptrNonNull(ref, "ref")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -91,6 +95,7 @@ public static void WriteToPtr(mrbind_test.mr.cs.std_string_view ptr) try { mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_WriteToPtr.invokeExact(mrbind_test.Ffi.ptr(ptr)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -113,6 +118,7 @@ public static void ConstRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -131,6 +137,7 @@ public static void RvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_RvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -149,6 +156,7 @@ public static void ConstRvalueRef(java.lang.String s) { java.lang.foreign.MemorySegment __str_s = mrbind_test.Ffi.utf8(__arena, java.util.Objects.requireNonNull(s, "s")); mrbind_test.ffi.MR.test_std_string_view.H0.MR_StdStringView_ConstRvalueRef.invokeExact(__str_s, mrbind_test.Ffi.end(__str_s)); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java index fb8bcb01..5940ada2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdtuplelike/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdtuplelike; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void SetPair(mrbind_test.mr.cs.std_pair_int_float _1) try { mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetPair.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -37,6 +38,7 @@ public static mrbind_test.mr.cs.std_pair_int_float GetPair() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -55,6 +57,7 @@ public static mrbind_test.mr.cs.std_pair_const_int_float GetPair2() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -73,6 +76,7 @@ public static mrbind_test.mr.cs.std_pair_int_ref_float_ref GetPair3() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair3.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int_ref_float_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -91,6 +95,7 @@ public static mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref GetPair4( try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair4.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int_ref_const_float_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -109,6 +114,7 @@ public static mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref GetPair try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair5.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_int_rvalue_ref_float_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -127,6 +133,7 @@ public static mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetPair6.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_pair_const_int_rvalue_ref_const_float_rvalue_ref(__ret, true, null); } catch (java.lang.Throwable __e) @@ -145,6 +152,7 @@ public static void SetTuple(mrbind_test.mr.cs.std_tuple_int_float _1) try { mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_SetTuple.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -166,6 +174,7 @@ public static mrbind_test.mr.cs.std_tuple_int_float GetTuple() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -185,6 +194,7 @@ public static mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_re try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple2.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_const_int_const_float_int_ref_float_ref_const_int_ref_const_float_ref_int_rvalue_ref_float__e0da444a(__ret, true, null); } catch (java.lang.Throwable __e) @@ -203,6 +213,7 @@ public static mrbind_test.mr.cs.std_tuple GetTuple7() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple7.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple(__ret, true, null); } catch (java.lang.Throwable __e) @@ -221,6 +232,7 @@ public static mrbind_test.mr.cs.std_tuple_float_double_int_int GetTuple8() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_tuple_like.H0.MR_StdTupleLike_GetTuple8.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_tuple_float_double_int_int(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java index fa476c36..713529bc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/A.java @@ -39,6 +39,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -63,6 +64,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +88,7 @@ public mrbind_test.mr.stduniqueptr.A assignFromAnother(mrbind_test.mr.stduniquep try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.stduniqueptr.A(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java index 68a50334..17db6080 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stduniqueptr/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stduniqueptr; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static java.lang.foreign.MemorySegment GetInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -72,6 +75,7 @@ public static void SetIntDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -89,6 +93,7 @@ public static void SetIntDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -106,6 +111,7 @@ public static void SetIntLvalueRef(mrbind_test.mr.cs.std_unique_ptr_int _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -123,6 +129,7 @@ public static void SetIntLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_int _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -144,6 +151,7 @@ public static void SetIntRvalueRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -161,6 +169,7 @@ public static void SetIntRvalueConstRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntRvalueConstRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -178,6 +187,7 @@ public static java.lang.foreign.MemorySegment GetIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -196,6 +206,7 @@ public static void SetIntArr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -213,6 +224,7 @@ public static void SetIntArrDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -230,6 +242,7 @@ public static void SetIntArrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetIntArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -247,6 +260,7 @@ public static mrbind_test.mr.stduniqueptr.A GetClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClass.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -265,6 +279,7 @@ public static void SetClass(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClass.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -282,6 +297,7 @@ public static void SetClassConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniqu try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -303,6 +319,7 @@ public static void SetClassDefTrivial(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -320,6 +337,7 @@ public static void SetClassDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -337,6 +355,7 @@ public static void SetClassLvalueRef(mrbind_test.mr.cs.std_unique_ptr_MR_StdUniq try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -354,6 +373,7 @@ public static void SetClassLvalueConstRef(mrbind_test.mr.cs.std_unique_ptr_MR_St try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassLvalueConstRef.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -375,6 +395,7 @@ public static void SetClassRvalueRef(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -392,6 +413,7 @@ public static void SetClassRvalueConstRef(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassRvalueConstRef.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -409,6 +431,7 @@ public static mrbind_test.mr.stduniqueptr.A GetClassArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.stduniqueptr.A(__ret, true, null); } catch (java.lang.Throwable __e) @@ -427,6 +450,7 @@ public static void SetClassArr(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArr.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -444,6 +468,7 @@ public static void SetClassArrDefTrivial(mrbind_test.mr.stduniqueptr.A _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDefTrivial.invokeExact(java.util.Objects.requireNonNull(_1, "_1").release()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -461,6 +486,7 @@ public static void SetClassArrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetClassArrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -479,6 +505,7 @@ public static int GetConstInt() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -497,6 +524,7 @@ public static int GetConstIntArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstIntArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -515,6 +543,7 @@ public static java.lang.foreign.MemorySegment GetConstClass() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClass.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -533,6 +562,7 @@ public static java.lang.foreign.MemorySegment GetConstClassArr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetConstClassArr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -552,6 +582,7 @@ public static java.lang.foreign.MemorySegment GetFloat() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_GetFloat.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -570,6 +601,7 @@ public static void SetFloat(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloat.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -587,6 +619,7 @@ public static void SetFloatDefTrivial(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_std_unique_ptr.H0.MR_StdUniquePtr_SetFloatDefTrivial.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java index 5cc227f5..f77b9b6c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/stdvariant/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.stdvariant; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static mrbind_test.mr.cs.std_variant_int_float foo() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_foo.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_int_float(__ret, true, null); } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void bar(mrbind_test.mr.cs.std_variant_int_float_float _1) try { mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_bar.invokeExact(mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -55,6 +57,7 @@ public static void baz(mrbind_test.mr.cs.std_variant_int_float_std_string _1) try { mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_baz.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -76,6 +79,7 @@ public static mrbind_test.mr.cs.std_variant_std_monostate_int_float blah() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_variant.H0.MR_StdVariant_blah.invokeExact(); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_variant_std_monostate_int_float(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java index 582b6481..64da91ac 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/tags/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.tags; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void foo_1_std_less_int() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_int.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -33,6 +34,7 @@ public static void foo_1_std_less_void() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_less_void.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -50,6 +52,7 @@ public static void foo_1_std_greater_int() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_int.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -67,6 +70,7 @@ public static void foo_1_std_greater_void() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_1_std_greater_void.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -84,6 +88,7 @@ public static void foo_0() try { mrbind_test.ffi.MR.test_tags.H0.MR_Tags_foo_0.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java index eccd9422..3f45f9ea 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/ClassTemplate_uint64_t.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -68,6 +69,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_uint64_t(long _1 try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +94,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct_int(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Construct_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t assignFromAnother(m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.testsimpletypes.ClassTemplate_uint64_t(__ret, false, __owner); } @@ -136,6 +140,7 @@ public void foo_uint64_t() try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_uint64_t.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -158,6 +163,7 @@ public void foo_int() try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_foo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -179,6 +185,7 @@ public static long var_() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Get_var_uint64_t.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(8).get(java.lang.foreign.ValueLayout.JAVA_LONG, 0); } catch (java.lang.Throwable __e) @@ -198,6 +205,7 @@ public static void setVar(long value) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_ClassTemplate_uint64_t_Set_var_uint64_t.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java index 3dfd795a..f5858c5f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsimpletypes/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsimpletypes; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static int GetInt() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetInt.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static void SetInt(int _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetInt.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -51,6 +53,7 @@ public static void SetIntDef(java.lang.Integer _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -68,6 +71,7 @@ public static java.lang.foreign.MemorySegment GetIntPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -86,6 +90,7 @@ public static void SetIntPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -103,6 +108,7 @@ public static void SetIntPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -120,6 +126,7 @@ public static void SetIntPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -137,6 +144,7 @@ public static java.lang.foreign.MemorySegment GetIntRef() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetIntRef.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -155,6 +163,7 @@ public static void SetIntRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +181,7 @@ public static void SetIntRefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetIntRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -189,6 +199,7 @@ public static java.lang.foreign.MemorySegment GetVoidPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -207,6 +218,7 @@ public static void SetVoidPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -224,6 +236,7 @@ public static void SetVoidPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -241,6 +254,7 @@ public static void SetVoidPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -258,6 +272,7 @@ public static java.lang.foreign.MemorySegment GetConstVoidPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetConstVoidPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -276,6 +291,7 @@ public static void SetConstVoidPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -293,6 +309,7 @@ public static void SetConstVoidPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -310,6 +327,7 @@ public static void SetConstVoidPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetConstVoidPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -327,6 +345,7 @@ public static java.lang.foreign.MemorySegment GetVoidPtrPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetVoidPtrPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -345,6 +364,7 @@ public static void SetVoidPtrPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -362,6 +382,7 @@ public static void SetVoidPtrPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -379,6 +400,7 @@ public static void SetVoidPtrPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetVoidPtrPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -396,6 +418,7 @@ public static int GetEnum() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -414,6 +437,7 @@ public static void SetEnum(mrbind_test.mr.testsimpletypes.E _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -431,6 +455,7 @@ public static void SetEnumDef(mrbind_test.mr.testsimpletypes.E _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumDef.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, _1.value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -448,6 +473,7 @@ public static java.lang.foreign.MemorySegment GetEnumPtr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumPtr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -466,6 +492,7 @@ public static void SetEnumPtr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -483,6 +510,7 @@ public static void SetEnumPtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -500,6 +528,7 @@ public static void SetEnumPtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumPtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -517,6 +546,7 @@ public static java.lang.foreign.MemorySegment GetEnumRef() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnumRef.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -535,6 +565,7 @@ public static void SetEnumRef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -552,6 +583,7 @@ public static void SetEnumRefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnumRefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -569,6 +601,7 @@ public static int GetEnum2() try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -587,6 +620,7 @@ public static void SetEnum2(mrbind_test.mr.testsimpletypes.E2 _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2.invokeExact(java.util.Objects.requireNonNull(_1, "_1").value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -604,6 +638,7 @@ public static void SetEnum2Def(mrbind_test.mr.testsimpletypes.E2 _1) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Def.invokeExact((java.lang.foreign.MemorySegment)(_1 == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_SHORT, _1.value))); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -621,6 +656,7 @@ public static java.lang.foreign.MemorySegment GetEnum2Ptr() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ptr.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -639,6 +675,7 @@ public static void SetEnum2Ptr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -656,6 +693,7 @@ public static void SetEnum2PtrDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -673,6 +711,7 @@ public static void SetEnum2PtrDefNull(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2PtrDefNull.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -690,6 +729,7 @@ public static java.lang.foreign.MemorySegment GetEnum2Ref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_GetEnum2Ref.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -708,6 +748,7 @@ public static void SetEnum2Ref(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2Ref.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -725,6 +766,7 @@ public static void SetEnum2RefDef(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_SetEnum2RefDef.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -743,6 +785,7 @@ public static void CheckCharMaybeUnsigned(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckCharMaybeUnsigned.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -760,6 +803,7 @@ public static void checkChar_unsigned_char_ptr(java.lang.foreign.MemorySegment _ try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_unsigned_char_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -777,6 +821,7 @@ public static void checkChar_signed_char_ptr(java.lang.foreign.MemorySegment _1) try { mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_CheckChar_signed_char_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -794,6 +839,7 @@ public static long blah_uint64_t(long x) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_uint64_t.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -812,6 +858,7 @@ public static long blah_int64_t(long x) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_blah_int64_t.invokeExact(x); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -831,6 +878,7 @@ public static long FuncTemplate(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -850,6 +898,7 @@ public static int FuncTemplate(int _1) try { int __ret = (int)mrbind_test.ffi.MR.test_simple_types.H0.MR_TestSimpleTypes_FuncTemplate_int.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java index fb8a1130..4130e5a1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/A_uint64_t.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.testsizet.A_uint64_t assignFromAnother(mrbind_test.mr.test try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.testsizet.A_uint64_t(__ret, false, __owner); } @@ -109,6 +112,7 @@ public long foo() try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_A_uint64_t_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java index 68382cc2..16527ff1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/testsizet/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.testsizet; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static long foo_uint64_t(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -34,6 +35,7 @@ public static java.lang.foreign.MemorySegment foo_uint64_t_ptr(java.lang.foreign try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_uint64_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -52,6 +54,7 @@ public static mrbind_test.mr.cs.std_vector_uint64_t foo(mrbind_test.mr.cs.std_ve try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_uint64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_uint64_t(__ret, true, null); } catch (java.lang.Throwable __e) @@ -74,6 +77,7 @@ public static long foo_int64_t(long _1) try { long __ret = (long)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -92,6 +96,7 @@ public static java.lang.foreign.MemorySegment foo_int64_t_ptr(java.lang.foreign. try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_int64_t_ptr.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -110,6 +115,7 @@ public static mrbind_test.mr.cs.std_vector_int64_t foo(mrbind_test.mr.cs.std_vec try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_size_t_ptrdiff_t.H0.MR_TestSizeT_foo_std_vector_int64_t.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(_1, "_1")); + mrbind_test.Ffi.checkException(); return new mrbind_test.mr.cs.std_vector_int64_t(__ret, true, null); } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java index 39f729d6..c1b41f84 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/A_int.java @@ -40,6 +40,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.typedefsintemplates.A_int assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.A_int(__ret, false, __owner); } @@ -111,6 +114,7 @@ public int foo() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_A_int_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java index 6aaf4cd1..36c829bc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.typedefsintemplates.B_int assignFromAnother(mrbind_test.mr try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.B_int(__ret, false, __owner); } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java index f1a1c7a0..b14e376e 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/B_int_BB_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public mrbind_test.mr.typedefsintemplates.B_int_BB_float assignFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.typedefsintemplates.B_int_BB_float(__ret, false, __owner); } @@ -109,6 +112,7 @@ public int foo() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -131,6 +135,7 @@ public int foo2() try { int __ret = (int)mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_B_int_BB_float_foo2.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java index fb77bd94..b41c489f 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/typedefsintemplates/Functions.java @@ -1,6 +1,6 @@ package mrbind_test.mr.typedefsintemplates; -/** The free functions of this namespace. Generated by mrbind, do not edit. */ +/** The free functions of this namespace. */ @java.lang.SuppressWarnings({"restricted", "cast"}) public final class Functions { @@ -16,6 +16,7 @@ public static void bar(int _1) try { mrbind_test.ffi.MR.test_typedefs_in_templates.H0.MR_TypedefsInTemplates_bar.invokeExact(_1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java index 26dd7170..9130a7b2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/A.java @@ -43,6 +43,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -70,6 +71,7 @@ private static java.lang.foreign.MemorySegment __ctor_construct(int _1) try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Construct.invokeExact(_1); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -88,6 +90,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -111,6 +114,7 @@ public mrbind_test.mr.usingdecls.A assignFromAnother(mrbind_test.mr.usingdecls.A try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.usingdecls.A(__ret, false, __owner); } @@ -135,6 +139,7 @@ public void assign(int _1) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_assign.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -156,6 +161,7 @@ public void Method() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -177,6 +183,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -194,6 +201,7 @@ public static int StaticVar() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_StaticVar.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -212,6 +220,7 @@ public static void setStaticVar(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_StaticVar.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -230,6 +239,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -252,6 +262,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_A_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java index 6502f976..345eeea1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/mr/usingdecls/B.java @@ -42,6 +42,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -64,6 +65,7 @@ public int convertTo_int() try { int __ret = (int)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_ConvertTo_int.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -87,6 +89,7 @@ public mrbind_test.mr.usingdecls.B assignFromAnother(mrbind_test.mr.usingdecls.B try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(_other, "_other")); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.usingdecls.B(__ret, false, __owner); } @@ -111,6 +114,7 @@ public void assign(int _1) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_assign.invokeExact(rawPointer(), _1); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -132,6 +136,7 @@ public void Method() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Method.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -153,6 +158,7 @@ public static void StaticFunc() try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_StaticFunc.invokeExact(); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -171,6 +177,7 @@ public int Field() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_Field.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -193,6 +200,7 @@ public void setField(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_Field.invokeExact(rawPointer(), value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -214,6 +222,7 @@ public static int StaticVar() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Get_StaticVar.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -232,10 +241,51 @@ public static void setStaticVar(int value) try { mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_Set_StaticVar.invokeExact(value); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { throw mrbind_test.Ffi.rethrow(__e); } } + + /** Upcasts to the base class `MR::UsingDecls::A`. The result refers to this object. + * + * Calls `MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A()`. */ + public mrbind_test.mr.usingdecls.A upcastToA() + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableUpcastTo_MR_UsingDecls_A.invokeExact(rawPointer()); + return new mrbind_test.mr.usingdecls.A(__ret, false, this); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(this); + } + } + + /** Static downcast from the base class `MR::UsingDecls::A`. Undefined behavior if the object isn't actually a `B`. The result refers to `object`. + * + * Calls `MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A()`. */ + public static mrbind_test.mr.usingdecls.B staticDowncastFromA(mrbind_test.mr.usingdecls.A object) + { + try + { + java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.MR.test_using_decls.H0.MR_UsingDecls_B_MutableStaticDowncastFrom_MR_UsingDecls_A.invokeExact(mrbind_test.Ffi.ptrNonNull(object, "object")); + return new mrbind_test.mr.usingdecls.B(__ret, false, object); + } + catch (java.lang.Throwable __e) + { + throw mrbind_test.Ffi.rethrow(__e); + } + finally + { + java.lang.ref.Reference.reachabilityFence(object); + } + } } diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java index f7d0879c..9c2ee743 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float other) try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_iterator find_mut(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_const_iterat try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_map_int_float_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_btree_map_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_map_int_float_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java index ffa7206f..1c8e1558 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_const_ try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java index 02bb2b62..8bf8a2e2 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_map_int_float_iterat try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_map_int_float.H0.MR_C_phmap_btree_map_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java index 8c556aa0..4c1077dc 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float o try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -172,6 +178,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator find(int try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator find_mut(int ke try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -263,6 +273,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_const_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -287,6 +298,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -309,6 +321,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multimap_int_float_iterato try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -333,6 +346,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -355,6 +369,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_const_ite try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -379,6 +394,7 @@ public mrbind_test.phmap.phmap_btree_multimap_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multimap_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -401,6 +417,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multimap_int_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java index 50d58b9a..9a901bf0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_c try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -225,6 +233,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java index 48fe1a90..dd5553fa 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multimap_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multimap_int_float_i try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -198,6 +205,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multimap_int_float.H0.MR_C_phmap_btree_multimap_int_float_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java index e5af6340..5068ce28 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int other) try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public long count(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { long __ret = (long)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_count.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_multiset_int_const_iterato try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_btree_multiset_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_multiset_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_multiset_int_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java index aed15913..a5e973ed 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_multiset_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_multiset_int_const_i try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_multiset_int.H0.MR_C_phmap_btree_multiset_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java index bffc3f7e..da589d67 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int other) try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_btree_set_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_btree_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_btree_set_int_const_iterator ite try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_btree_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_btree_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_btree_set_int_const_iterator iter) try { boolean __ret = (boolean)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java index f1347998..361138b7 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_btree_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_btree_set_int_const_iterat try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public void decr() try { mrbind_test.ffi.phmap_btree_set_int.H0.MR_C_phmap_btree_set_int_const_iterator_decr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java index 86fb70b8..37ec1c43 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float ot try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator find(int k try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator find_mut(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_map_int_float_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java index 2668ebda..93e1be81 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_co try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java index 70c0c192..7d9268a6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_map_int_float_it try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_map_int_float.H0.MR_C_phmap_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java index 9729b9cc..88733495 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int other) try { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_flat_hash_set_int_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java index 5e2b0794..0687c782 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_flat_hash_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_flat_hash_set_int_const_it try { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_flat_hash_set_int.H0.MR_C_phmap_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java index c077ca28..7d56c333 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float ot try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator find(int k try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator find_mut(int key try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_const_it try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator begin_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_const_iter try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_node_hash_map_int_float_iterator end_mut() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_map_int_float_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java index c8ed06fd..f21f8e62 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_co try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java index 7e0ef250..58dfc6f1 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_map_int_float_it try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_map_int_float.H0.MR_C_phmap_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java index f1c91a19..42bf494d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int other) try { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator find(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_node_hash_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_node_hash_set_int_const_iterator i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java index 8696bfa7..808ec2ae 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_node_hash_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_node_hash_set_int_const_it try { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_node_hash_set_int.H0.MR_C_phmap_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java index 9fdc684f..f866f2b6 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator f try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator find_mu try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator begin_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_c try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator end_mut try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_map_int_float_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java index eed306f4..6c596b4a 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java index b78ea3b5..664cf73c 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_map_int try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_map_int_float.H0.MR_C_phmap_parallel_flat_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java index d243f4ea..6f63683d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator find(in try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_flat_hash_set_int_const_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java index 2b83ae90..05ab6320 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_flat_hash_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_flat_hash_set_int try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_flat_hash_set_int.H0.MR_C_phmap_parallel_flat_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java index c130c734..73d88f2b 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -107,6 +110,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -129,6 +133,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -151,6 +156,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -173,6 +179,7 @@ public java.lang.foreign.MemorySegment find_or_construct_elem(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_or_construct_elem.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -218,6 +226,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator f try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -241,6 +250,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator find_mu try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_find_mut.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -264,6 +274,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator b try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -286,6 +297,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -310,6 +322,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator begin_m try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_begin_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -332,6 +345,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_begin_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -356,6 +370,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator e try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -378,6 +393,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_c try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -402,6 +418,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator end_mut try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_end_mut.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -424,6 +441,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_map_int_float_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_is_end_mut.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java index 06e3f1f4..88870437 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_from_mutable(mrbind_test.p try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_from_mutable.invokeExact(mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -135,6 +139,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -159,6 +164,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -182,6 +188,7 @@ public float deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_FLOAT, 0); } catch (java.lang.Throwable __e) @@ -204,6 +211,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java index 2292924b..0cba694d 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_map_int_float_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_map_int try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public mrbind_test.mr.cs.std_pair_const_int_float deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); java.lang.Object __owner = this; return new mrbind_test.mr.cs.std_pair_const_int_float(__ret, false, __owner); } @@ -132,6 +136,7 @@ public int deref_key() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_key.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -155,6 +160,7 @@ public java.lang.foreign.MemorySegment deref_value() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_deref_value.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -177,6 +183,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_map_int_float.H0.MR_C_phmap_parallel_node_hash_map_int_float_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java index d4886680..51cf7522 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromAnother.invokeExact(mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.PASS_BY_COPY, mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -112,6 +115,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromRange(java.la try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_ConstructFromRange.invokeExact((java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void assignFromRange(java.lang.Integer ptr, long size) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_AssignFromRange.invokeExact(rawPointer(), (java.lang.foreign.MemorySegment)(ptr == null ? java.lang.foreign.MemorySegment.NULL : mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, ptr)), size); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -151,6 +156,7 @@ public long size() try { long __ret = (long)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_size.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -173,6 +179,7 @@ public boolean empty() try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_empty.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -195,6 +202,7 @@ public void clear() try { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_clear.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -216,6 +224,7 @@ public boolean contains(int key) try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_contains.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -239,6 +248,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator find(in try (java.lang.foreign.Arena __arena = java.lang.foreign.Arena.ofConfined()) { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_find.invokeExact(rawPointer(), mrbind_test.Ffi.alloc(__arena, java.lang.foreign.ValueLayout.JAVA_INT, key)); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -261,6 +271,7 @@ public void insert(int new_elem) try { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_insert.invokeExact(rawPointer(), new_elem); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -283,6 +294,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator begin() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_begin.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -305,6 +317,7 @@ public boolean is_begin(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_begin.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -329,6 +342,7 @@ public mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator end() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_end.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return new mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_iterator(__ret, true, null); } catch (java.lang.Throwable __e) @@ -351,6 +365,7 @@ public boolean is_end(mrbind_test.phmap.phmap_parallel_node_hash_set_int_const_i try { boolean __ret = (boolean)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_is_end.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(iter, "iter")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) diff --git a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java index eb61de6a..899e48e0 100644 --- a/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java +++ b/test/output_java_fixed_typedefs_64_only/src/mrbind_test/phmap/phmap_parallel_node_hash_set_int_const_iterator.java @@ -38,6 +38,7 @@ private static java.lang.foreign.MemorySegment __ctor_defaultConstruct() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_DefaultConstruct.invokeExact(); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -62,6 +63,7 @@ private static java.lang.foreign.MemorySegment __ctor_constructFromAnother(mrbin try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_ConstructFromAnother.invokeExact(mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); return __ret; } catch (java.lang.Throwable __e) @@ -85,6 +87,7 @@ public void assignFromAnother(mrbind_test.phmap.phmap_parallel_node_hash_set_int try { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_AssignFromAnother.invokeExact(rawPointer(), mrbind_test.Ffi.ptrNonNull(other, "other")); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { @@ -108,6 +111,7 @@ public int deref() try { java.lang.foreign.MemorySegment __ret = (java.lang.foreign.MemorySegment)mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_deref.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); return __ret.reinterpret(4).get(java.lang.foreign.ValueLayout.JAVA_INT, 0); } catch (java.lang.Throwable __e) @@ -130,6 +134,7 @@ public void incr() try { mrbind_test.ffi.phmap_parallel_node_hash_set_int.H0.MR_C_phmap_parallel_node_hash_set_int_const_iterator_incr.invokeExact(rawPointer()); + mrbind_test.Ffi.checkException(); } catch (java.lang.Throwable __e) { From 8ac17cb056ae9521b05833699f713d1ad61399ab Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Wed, 14 Oct 2026 23:53:30 +0300 Subject: [PATCH 10/10] Java: follow the callable_info rename of the std::function description Co-Authored-By: Claude Fable 5.1 --- src/generators/java/generator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generators/java/generator.cpp b/src/generators/java/generator.cpp index ab6ec3e4..824a3a3d 100644 --- a/src/generators/java/generator.cpp +++ b/src/generators/java/generator.cpp @@ -725,7 +725,7 @@ namespace mrbind::Java if (base.class_desc->is_polymorphic) AddSimple(info.c_name + "_MutableDynamicDowncastFrom_" + base.c_name, 1, true); }); - if (cl.std_function && info.has_destroy) + if (cl.callable_info && info.has_destroy) { AddSimple(info.c_name + "_ConstructEx", 4, true); AddSimple(info.c_name + "_AssignEx", 5, false); @@ -802,7 +802,7 @@ namespace mrbind::Java void Generator::EmitStdFunction(const TypeInfo &info, std::string &members, std::set &used_keys) { - const auto &sf = *info.class_desc->std_function; + const auto &sf = *info.class_desc->callable_info; const std::string F = RuntimeClass("Ffi"); const std::string MS(kMemorySegment); const std::string ctor_c_name = info.c_name + "_ConstructEx"; @@ -2396,7 +2396,7 @@ public abstract class CppStruct implements Native } EmitCasts(info, members, used_keys); - if (cl.std_function && info.has_destroy) + if (cl.callable_info && info.has_destroy) EmitStdFunction(info, members, used_keys); // Conveniences for `std::string`.